pip 安装程序似乎不会在 Python 服务器的 PATH 中写入



我试图从Turi下载Graphlab,并遵循以下教程。我用他们的工具编码并尝试计算 Python 脚本,但它回答了我一个ImportError

(gl-env)ubuntu@ip-172-hey-hey-hey:~/Eclipse-Stats$ source deactivate
discarding /home/ubuntu/anaconda2/envs/gl-env/bin from PATH
ubuntu@ip-172-hey-hey-hey:~/Eclipse-Stats$ unset PYTHONPATH
ubuntu@ip-172-hey-hey-hey:~/Eclipse-Stats$ python Main.py 
2017-07-27 14:56:00.520425
/home/ubuntu/.local/lib/python2.7/site-packages/sklearn/cross_validation.py:44: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
"This module will be removed in 0.20.", DeprecationWarning)
Traceback (most recent call last):
File "Main.py", line 3, in <module>
import prediction
File "/home/ubuntu/Eclipse-Stats/prediction.py", line 1, in <module>
from graphlab.toolkits.recommender import ranking_factorization_recommender
ImportError: No module named graphlab.toolkits.recommender

实际上,当我尝试使用pipnumpyscipysklearn下载时,它经常出现在服务器上...就像我们在下面的对话(西班牙语(中看到的那样,FJSevilla和我正在合作的团队的人。

两件事:(1(检查Python控制台的版本,看看它是否匹配或高于与软件包的兼容性。如果您查看折旧消息并通读它,您会更多地了解发生了什么。(2( 小心要导入的内容以及如何导入它们,因为您的格式也可能是语法 all 错误。您可以做的一件事是找到包,手动下载,解压缩,然后运行 setup.py。

相关内容

最新更新