美文网首页
ImportError after successful pip

ImportError after successful pip

作者: lilith买买买 | 来源:发表于2018-06-14 17:39 被阅读263次
➜  ~ pip install py2neo 
Installing collected packages: py2neo
Successfully installed py2neo-4.0.0

1.用pip成功安装了py2neo ,但是import py2neo的时候一直ImportError: No module named py2neo

在stackoverflow上找到一个方法

python -m pip install <library-name> instead of pip install <library-name>

2.但是我又出现了下面的问题:
Could not fetch URL https://pypi.python.org/simple/py2neo/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) - skipping
Could not find a version that satisfies the requirement py2neo (from versions: )
No matching distribution found for py2neo

解决:需要更新pip

curl https://bootstrap.pypa.io/get-pip.py | python

3.然后又出现了下面的问题:
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pip-9.0.1.dist-info/DESCRIPTION.rst'
Consider using the --user option or check the permissions.

解决:

curl https://bootstrap.pypa.io/get-pip.py | sudo python

成功升级pip后,再执行python -m pip install py2neo就可以了

相关文章

网友评论

      本文标题:ImportError after successful pip

      本文链接:https://www.haomeiwen.com/subject/tqnyeftx.html