Wenn ich meine Downloads
Verzeichnis auf Mac OSX (10.9.5) eingeben, ich Python von meinem Terminal eingegeben und versucht, Pandas zu importieren import pandas as pd
Pandas arbeiten nicht in Downloads Verzeichnis
name:Downloads name$ python
Python 2.7.5 (default, Mar 9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas as pd
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/pandas/__init__.py", line 22, in <module>
from pandas.compat.numpy import *
File "/Library/Python/2.7/site-packages/pandas/compat/__init__.py", line 38, in <module>
import inspect
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/inspect.py", line 39, in <module>
import tokenize
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tokenize.py", line 30, in <module>
from token import *
File "token.py", line 7, in <module>
reader = csv.reader(open('ebook.csv', 'rb'))
IOError: [Errno 2] No such file or directory: 'ebook.csv'
In anderen Verzeichnissen Ich habe obwohl versucht, scheint dies zu importieren Pandas gut ohne Beschwerde (einschließlich zufällige System-Verzeichnisse, das Home-Verzeichnis und meine ~/Dokumente-Verzeichnis).
Warum ist ebook.csv einfach ein Problem in den Downloads?
Vielen Dank! Das Problem lag im 'Downloads'-Verzeichnis, nicht 'Documents', aber Ihre Logik und Erklärung wurde noch vollständig übernommen und es stellte sich heraus, dass ich' 'token.py'' im 'Downloads'-Verzeichnis hatte haha – rzs
Ah, danke für die Korrektur. – unutbu