Pandas不是在Python中工作,而是在Python中工作

2024-07-08 07:21:58 发布

您现在位置:Python中文网/ 问答频道 /正文

我试着在python3经营熊猫。但是我得到了以下错误。在

user@client3:~/smith/Python$ python3
Python 3.7.0 (default, Oct  3 2018, 21:22:25) 
[GCC 5.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas as pd
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'pandas'

所以我试着从python逃跑

^{pr2}$

这里很好用。所以我试着为python3安装pandas,如下所示

user@client3:~/smith/Python$ sudo apt-get install python3-pandas
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-pandas is already the newest version (0.17.1-3ubuntu2).
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-139 linux-headers-4.4.0-139-generic linux-image-4.4.0-139-generic linux-image-extra-4.4.0-139-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 22 not upgraded.

它已经为python3安装。这里发生了什么事?为什么不选Python3?在


Tags: installedandpandasinformationlinuxsudoaptgeneric

热门问题