Python中文
首页
教程
问答
标签
搜索
登录
注册
导入Pandas导入错误:没有名为Pandas的模块
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>当我尝试运行以下源时(我安装了anaconda, 其他水蟒图书馆没有问题): <i/></p> <pre><code>#!/usr/bin/python import pandas def add_full_name(path_to_csv, path_to_new_csv): f = pandas.read_csv(path_to_csv) print f['nameFirst'], f['nameLast'] f['nameFull'] = f['nameFirst'] + ' ' + f['nameLast'] f.to_csv(path_to_new_csv) add_full_name("./AllstarFull.csv", "./AllstarFullNew.csv") </code></pre> <p/> <p>我明白了</p> <pre><code>"import pandas ImportError: No module named pandas" </code></pre> <p>但是当我使用命令行并在没有问题的地方导入panda时</p> <pre><code>$ python Python 2.7.8 |Anaconda 2.0.0 (x86_64)| (default, Jul 2 2014, 15:36:00) [GCC 4.2.1 (Apple Inc. build 5577)] on darwin Type "help", "copyright", "credits" or "license" for more information. Anaconda is brought to you by Continuum Analytics. Please check out: http://continuum.io/thanks and https://binstar.org >>> import pandas >>> </code></pre> <p>但我还是不能用任何我喜欢的熊猫命令</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>您的程序特别要求使用shebang行<code>#!/usr/bin/python</code>运行系统Python,因此无论您是否安装了anaconda,此程序都不会使用anaconda的Python运行。尝试运行命令</p> <pre><code>python program.py </code></pre> <p>(或者你的程序叫什么)。这将确保您获得安装了Pandas的Python版本。</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
在python3中使用Scipy pearsonr函数
6 回答
在Python3中使用scipy对多个lorentzian进行数据拟合
5 回答
在Python3中使用Script=argv
9 回答
在python3中使用selenium webdriver进行未解析的回溯
1 回答
在python3中使用selenium和phantomjs的网页截图之前如何等待?
10 回答
在Python3中使用Selenium和Requests模块从网页获取文件
10 回答
在python3中使用SIGINT终止函数
7 回答
在Python3中使用SIGTERM时,允许进程完成而不是中断
5 回答
在python3中使用smtplib发送XML内容
10 回答
在python3中使用socket库(RFCOMM模式)重新连接蓝牙设备?
3 回答
在python3中使用sounddevice和numpy编写wav文件
4 回答
在python3中使用Sqlalchemy插入MySQL查找类型错误的原因
10 回答
在python3中使用sqlite、pandas和sqlalchemy很难让rollback工作
7 回答
在python3中使用SQLite的FTS3/4
8 回答
在Python3中使用struct.calcsize()和len()有区别吗?
5 回答
在python3中使用substring函数时发生TypeError
6 回答
在Python3中使用Tkinter entry小部件写入串行设备
10 回答
在python3中使用tkinter时,如何在每次按下函数时获得运行该函数的按钮?
9 回答
在python3中使用tkinter的子帧
10 回答
在Python3中使用tryexcept块时,如何避免使用未初始化的变量?
5 回答