编辑附加
让我先说一下:我已经阅读了有关“ModuleNotFound”错误的建议文章,以及一些搜索的“set path permanent mac osx”文章。
我的目标:在Mac OSX v 10.13.3上使用Coinbase Python库
问题:ModuleNotFoundError: No module named 'coinbase'
当前配置:
echo $path
会产生/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/lib/python3.6/site-packages:
`LS
$ pip3 install coinbase
会产生Requirement already satisfied: coinbase in /usr/local/lib/python3.6/site-packages
注意:如果我从>>>import coinbase
启动Python,我可以/usr/local/lib/python3.6/site-packages
,如:
$ cd /usr/local/lib/python3.6/site-packages
$ python3
.......
>>> import coinbase
以下是ls /usr/local/lib/python3.6/site-packages
的结果
=============================================== ========================= 编辑1:
pip show coinbase
收益Location: /Library/Python/2.7/site-packages
而pip3 show coinbase
会产生Location: /usr/local/lib/python3.6/site-packages
我使用python3 -m site
来获取以下内容。所以现在我的问题是:如何配置pip3安装到正确的位置(/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6)?