【发布时间】:2020-12-03 21:51:04
【问题描述】:
我已经安装了 Python 3.8 和 Pip3。
当我尝试使用 Pip3 安装一个包时,它说它是成功的,但是 Python 找不到该包。我已经在下面发布了终端输出。
我已经尝试了几天来解决这个问题,但找不到解决问题的方法。
tobias@tobias-Ideapad-Z570:~$ which python3
/usr/local/bin/python3
tobias@tobias-Ideapad-Z570:~$ which pip3
/usr/bin/pip3
tobias@tobias-Ideapad-Z570:~$ pip3 install pandas
Collecting pandas
Using cached https://files.pythonhosted.org/packages/a7/f7/2adca20a7fa71b6a32f823bbd83992adeceab1d8bf72992bb7a55c69c19a/pandas-1.1.0-cp36-cp36m-manylinux1_x86_64.whl
...
Using cached https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl
Installing collected packages: pytz, numpy, six, python-dateutil, pandas
Successfully installed numpy-1.19.1 pandas-1.1.0 python-dateutil-2.8.1 pytz-2020.1 six-1.15.0
tobias@tobias-Ideapad-Z570:~$ pip3 list
apturl (0.5.2)
asn1crypto (0.24.0)
Brlapi (0.6.6)
certifi (2018.1.18)
...
numpy (1.19.1)
oauth (1.0.1)
olefile (0.45.1)
pandas (1.1.0)
pexpect (4.2.1)
Pillow (5.1.0)
...
xkit (0.0.0)
zope.interface (4.3.2)
tobias@tobias-Ideapad-Z570:~$ python3
Python 3.8.5 (default, Aug 13 2020, 13:38:56)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'pandas'
我是 Linux 新手,我在网上看到的很多关于这个问题的东西都超出了我的理解。任何帮助都会很棒。
【问题讨论】:
-
你能检查一下
import sys print(sys.executable)的输出是什么
标签: python linux pandas ubuntu pip