Reputation: 139
Since I updated to python 3.9.1 I have problems to load some functions I created and stored in a different path. Previously, I was working with python 3.6.8 and the function import worked. The code I use for importing is the following:
sys.path.append("[absolute path to folder]") # add to python path
from [python file name without .py] import [function name in file]
If I execute the previous lines one by one, I get following error:
[WinError 10054] An existing connection was forcibly closed by the remote host
The full message is:
[2021-01-12 08:27:57,081] DEBUG matplotlib (private) matplotlib data path: C:\Users\user\AppData\Roaming\Python\Python39\site-packages\matplotlib\mpl-data
[2021-01-12 08:27:57,081] DEBUG matplotlib matplotlib data path: C:\Users\user\AppData\Roaming\Python\Python39\site-packages\matplotlib\mpl-data
[2021-01-12 08:27:57,095] DEBUG matplotlib CONFIGDIR=C:\Users\user\.matplotlib
[2021-01-12 08:27:57,098] DEBUG matplotlib matplotlib version 3.3.3
[2021-01-12 08:27:57,099] DEBUG matplotlib interactive is False
[2021-01-12 08:27:57,100] DEBUG matplotlib platform is win32
[2021-01-12 08:27:57,101] DEBUG matplotlib loaded modules: ["here all the loaded modules"]
[2021-01-12 08:27:57,171] DEBUG matplotlib CACHEDIR=C:\Users\user\.matplotlib
[2021-01-12 08:27:57,181] DEBUG matplotlib.font_manager Using fontManager instance from C:\Users\user\.matplotlib\fontlist-v330.json
[2021-01-12 08:27:57,531] DEBUG matplotlib.pyplot Loaded backend tkagg version unknown.
[2021-01-12 08:27:57,531] DEBUG matplotlib.pyplot Loaded backend TkAgg version unknown.
[WinError 10054] An existing connection was forcibly closed by the remote host.
Digging a bin on the function I've discovered that the error is an import error from the seaborn module, because if I import it I get:
import seaborn as sns
[WinError 10054] An existing connection was forcibly closed by the remote host
Any clues of what is happening?
Upvotes: 0
Views: 113
Reputation: 2864
it's possible the libraries you're attempting to use are not yet compatible with your new python version, check the documentations for seaborn and matplotlib to find out what the latest python version they are made for is. Generally it's best to stay a couple of minor versions behind the latest python release to give third party libraries some leeway to catch up
Upvotes: 1