python导入pandas时找不到指定模块_Atom中PythonPandas的导入模块错误(在CLI中工作正常??)...

我是Python新手,很喜欢它。在用Python内核编写控制台以适应语法之后,我现在将重点放在Pandas、Numpy和Matplotlib的关键绘图和分析库上。我希望在不久的将来继续使用Scipy和PySpark。到目前为止,我已经在我的macosx10.11.3、python2.7.10、iPython、Matplotlib、Numpy和Pandas上安装了。我用过pip install Pandas --upgrade

升级如下:Successfully installed numpy-1.10.4 pandas-0.17.1 pytz-2015.7 six-1.10.0

我用python运行了一个项目:import pandas as pd

import numpy as np

import matplotlib as plt

这个项目在CLI中运行良好,没有出现错误,但是当我在Atom编辑器中运行它时,会返回一条错误消息(对于numpy、matplotlib,它运行得很好,但是对于pandas则没有)。信息是:

^{pr2}$

由于pandas as pdimport在CLI中运行良好,有人能告诉我为什么Atom编辑器找不到它,尤其是当它可以找到Numpy as np和{}时,注意到所有3个库文件夹都在我Mac上的同一个site-packages文件夹中时?另外,如果有什么办法让Atom指向Mac站点包中的pandas文件夹呢?在Update 6th Feb, 2016: I uninstalled pandas with pip uninstall pandas and reinstalled it to site-packages folder where numpy & matplotlib are. The reinstall was done through sudo easy_install pandas and once again, pandas module is not found in Atom using CMD+i but is accessed by Python VM through CLI running of the program and print pd.Series(x) for example works find and return series array of x. As numpy and matplot lib are recognised in autocomplete in Atom as packages and panadas is not, I can only assume the "input from console" features of pandas I have yet to discover is why Atom does not link to Pandas. Can someone with experience on Python-pandas and Atom comment please and set me straight? Much appreciated... I would like to fix Atom as I like it and would like to use the CMD+i function instead of the CLI every 2 mins... lol.. thanks for your help..

Update #2 6th Feb, 2016: Just to confirm, I have been working with DataFrames in Panda using the CLI and it works, it returns errors from Pandas error handling library proving I have Pandas and CLI allows it to work even though when I do CMD+i, it returns the no Pandas module message in Atom. Its either bad error handling by Atom or a bug not connecting with Pandas properly. Any thoughts on it are appreciated as I intend to work extensively with Pandas.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值