为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$ 

尝试运行python3.9 -m pip install -U --user numpy-U表示升级,--user表示它将安装在您的用户文件夹,而不是系统文件夹-它只是消除该消息。

NumPy是1.22版本,所以pandas可能只是不工作与旧版本。

相关内容

  • 没有找到相关文章

最新更新