No module named 'pkg_resources'

I tried updating shadoworflow with pip install tensorflow --upgrade. setuptoolsAn error occurred while uninstalling the old version :

PermissionError: [Errno 13] Permission denied: '/Users/<myName>/anaconda/lib/python3.5/site-packages/easy-install.pth'

and

FileNotFoundError: [Errno 2] No such file or directory: '/Users/<myName>/anaconda/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg'

Now, when using pip, I get an error message No module named 'pkg_resources'.

I tried the solution in the stream No module named pkg_resources :

Using

curl https://bootstrap.pypa.io/ez_setup.py | python

the following error appeared again (also when using sudo curl):

error: [Errno 13] Permission denied: '/Users/<myName>/anaconda/lib/python3.5/site-packages/easy-install.pth'

Trying to reinstall setuptoolsas suggested:

pip install --upgrade setuptools

results in the same error message No module named 'pkg_resources'.

I am using MacOS 10.12.4

+4
source share
1 answer

, - sudo - . , , . easy-install.pth.

sudo chown myuser easy-install.pth
chmod +x easy-install.pth

curl https://bootstrap.pypa.io/ez_setup.py | python

No module named 'pkg_resources'. pip . tensorflow pip install tensorflow --upgrade , .

+2

Source: https://habr.com/ru/post/1675915/


All Articles