我是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.