当我尝试在Python解释器(版本2.6.1)中导入scipy模块(版本0.11.0b1)时,我收到以下错误:
Traceback (most recent call last):
File "<stdin>", line 1, in module
File "/Users/...long path.../Desktop/scipy-0.11.0b1/scipy/\__init__.py", line 114, in module
ImportError: Error importing scipy: you cannot import scipy while
being in scipy source directory; please exit the scipy source
tree first, and relaunch your python intepreter.
问题在于Python正在读取一个不存在的文件。我一段时间前从桌面上删除了scipy目录,并尝试了几次重新启动解释器(和计算机)。为什么回溯仍然会引用一个不存在的文件?
python/site-packages
目录下删除一些与包相关的信息。 - Alexander