为python3.9安装numpy的麻烦
我在Ubuntu上安装了几个Python版本。我想念什么?
user@serverA:/folderB$ python3.9 -m pip install numpy
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (1.13.3)
user@serverA:/folderB$ python3.9 logs_unifier.py
Traceback (most recent call last):
File "/folderB/logs_unifier.py", line 2, in <module>
import pandas as pd
File "/usr/lib/python3/dist-packages/pandas/__init__.py", line 18, in <module>
raise ImportError(
ImportError: Missing required dependencies ['numpy']
user@serverA:/folderB$
I am running on ubuntu with several python versions installed. What am I missing?
user@serverA:/folderB$ python3.9 -m pip install numpy
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (1.13.3)
user@serverA:/folderB$ python3.9 logs_unifier.py
Traceback (most recent call last):
File "/folderB/logs_unifier.py", line 2, in <module>
import pandas as pd
File "/usr/lib/python3/dist-packages/pandas/__init__.py", line 18, in <module>
raise ImportError(
ImportError: Missing required dependencies ['numpy']
user@serverA:/folderB$
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试运行
Python3.9 -M Pip install -u -u -user numpy
。-U
表示升级,- 用户
表示它将在您的用户文件夹中安装,而不是系统文件夹 - 它只是摆脱了该消息。Numpy可以使用1.22版,因此
pandas
可能不适用于旧版本。Try running
python3.9 -m pip install -U --user numpy
.-U
means upgrade, and--user
means it'll install in your user folder, not the system folder - it just gets rid of that message.NumPy is up to version 1.22, so it's possible that
pandas
just doesn't work with the old version.