我正在尝试通过
在 jenkins 中安装 python 要求pip install requirements.cfg
现在我的需求文件中有 3 个包:numpy、pandas 和 tslearn。 Numpy 和 pandas 已正确安装,但尝试安装 tslearn 时失败,因为“未安装 numpy”。我正在 conda 虚拟环境中安装。
这是 Jenkins 作业输出:
Collecting numpy==1.14.3 (from -r pip_requirements.cfg (line 1))
Using cached https://files.pythonhosted.org/packages/20/09/6f302aba4a08ffcd34b20a6ee94f34a76207105f59acd83462b81469c06e/numpy-1.14.3-cp35-none-win_amd64.whl
Collecting pandas==0.19.2 (from -r pip_requirements.cfg (line 2))
Using cached https://files.pythonhosted.org/packages/d9/c9/0197da1728e813d37b8b38f795aac95ea0c334b75b365078b2b8476dcd11/pandas-0.19.2-cp35-cp35m-win_amd64.whl
Collecting tslearn>=0.1.9 (from -r pip_requirements.cfg (line 3))
Cache entry deserialization failed, entry ignored
Downloading https://files.pythonhosted.org/packages/5e/9e/4315deb6e42ed0fc8dc5e233c90b6b843199686119d5429b835a4ca25e41/tslearn-0.1.19.2.tar.gz (584kB)
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\econib.ci\AppData\Local\Temp\pip-build-s3wdsvej\tslearn\setup.py", line 2, in <module>
import numpy
ImportError: No module named 'numpy'
有什么想法为什么会发生这种情况吗?
最佳答案
这可能会解决您的问题,因为它总是可以帮助我找到新的软件包。
- 更新 numpy 包和其他所需的包。 (版本)
- 安装 Visual Studio C++ 模块。 (推荐)
- 尝试从源包(您可以在线学习)安装,而不是使用 pip 或 pip3 下载并安装。
- 再次阅读软件包的文档。
关于python - tslearn 包看不到 numpy 安装 python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52005509/