问题1:

使用 pip 安装包的时候如 pip install keras,遇到了如下错误:

Could not import setuptools which is required to install from a source distribution.
Traceback (most recent call last):
  File "/home/zhangkf/.conda/envs/tf15/lib/python3.5/site-packages/pip/req/req_install.py", line 387, in setup_py
    import setuptools  # noqa
  File "/home/zhangkf/.conda/envs/tf15/lib/python3.5/site-packages/setuptools/__init__.py", line 11, in <module>
    from ._deprecation_warning import SetuptoolsDeprecationWarning
ImportError: No module named 'setuptools._deprecation_warning'

查阅资料发现:这是因为 python 环境中没有 setuptools 这个包。安装上就可以了:

pip install -U setuptools

再次运行pip install keras,没有上述问题啦。

问题2:

Failed building wheel for pyyaml
Running setup.py clean for pyyaml
Failed to build pyyaml

说明没有安装pyyaml这个包,可以安装一下。

(pytorch) zhangkf@Ubuntu2:~/download$ pip install PyYAML
Collecting PyYAML
Installing collected packages: PyYAML
Successfully installed PyYAML-3.13

最后成功了

(pytorch) zhangkf@Ubuntu2:~/download$ pip install torch-0.4.1-cp36-cp36m-linux_x86_64.whl 
Processing ./torch-0.4.1-cp36-cp36m-linux_x86_64.whl
Installing collected packages: torch
Successfully installed torch-0.4.1

GitHub 加速计划 / li / linux-dash
10.39 K
1.2 K
下载
A beautiful web dashboard for Linux
最近提交(Master分支:2 个月前 )
186a802e added ecosystem file for PM2 4 年前
5def40a3 Add host customization support for the NodeJS version 4 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐