简体   繁体   English

为 python3.9 安装 numpy 时遇到问题

[英]trouble installing numpy for python3.9

I am running on ubuntu with several python versions installed.我在 ubuntu 上运行,安装了几个 python 版本。 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$ 

Try running python3.9 -m pip install -U --user numpy .尝试运行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. -U表示升级,-- --user表示它将安装在您的用户文件夹中,而不是系统文件夹中 - 它只是删除了该消息。

NumPy is up to version 1.22, so it's possible that pandas just doesn't work with the old version. NumPy 最高版本为 1.22,因此pandas可能不适用于旧版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM