首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >熊猫不是在python3工作,而是在蟒蛇工作

熊猫不是在python3工作,而是在蟒蛇工作
EN

Stack Overflow用户
提问于 2019-02-14 05:13:08
回答 1查看 1.4K关注 0票数 0

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

代码语言:javascript
复制
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

代码语言:javascript
复制
user@client3:~/smith/Python$ python
Python 2.7.12 (default, Nov 12 2018, 14:36:49) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas as pd
>>> exit()

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

代码语言:javascript
复制
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?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-02-14 05:29:13

这应该能行,你看。

代码语言:javascript
复制
pip3 install pandas
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54683598

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档