Attribute Error Installing with pip

后端 未结 1 1993
执念已碎
执念已碎 2020-12-06 01:38

This is a head stumper so I am posting this question AFTER having examined and read all of the prior posts on this issue.

Running OSX 10.9 Python 2.7 no virtualenv<

相关标签:
1条回答
  • 2020-12-06 02:10

    This error is caused by the presence of an outdated version of pkg_resources. In order to get rid of the error, do the following:

    1. Start a python session, import pkg_resources, and view the file from which it is loaded:

      In [1]: import pkg_resources
      
      In [2]: pkg_resources.__file__
      Out[2]: '/usr/lib/python2.7/dist-packages/pkg_resources.pyc'
      
    2. Remove this file (and the associated *.py file):

      $ sudo rm /usr/lib/python2.7/dist-packages/pkg_resources.py*
      
    3. That's it! Re-run the installation; it should complete without any errors:

      $ sudo pip install awssh
      

    Warning

    If you're on a Debian based Linux system, this file might have been installed via the python-pkg-resources package. Therefore updating or reinstalling this package will reinstate the stale module! Also be aware that you're messing with a file which is supposed to be controlled by apt.

    0 讨论(0)
提交回复
热议问题