【发布时间】:2017-03-19 07:46:26
【问题描述】:
我想在我的 windows7 anaconda 安装中使用旧的 cellular automata package called cage。
问题是使用curses模块,没有官方安装。
我在 http://www.lfd.uci.edu/~gohlke/pythonlibs/#curses 下载了非官方的二进制文件,然后 /think/ 我安装了它。
C:\Users\mds>pip install c:\Users\mds\Downloads\curses-2.2-cp27-none-win_amd64.w
hl
Processing c:\users\mds\downloads\curses-2.2-cp27-none-win_amd64.whl
Installing collected packages: curses
Successfully installed curses-2.2
You are using pip version 8.1.1, however version 9.0.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
但是在 Spyder 内部,当我运行cage 包的其中一个模块(conway.py) 时,它会在_curses 模块上报错。
runfile('C:/Users/mds/Dropbox/_python/automata/cage-1.1.4/conway.py', wdir='C:/Users/mds/Dropbox/_python/automata/cage-1.1.4')
C:/Users/mds/Dropbox/_python/automata/cage-1.1.4/conway.py:13: RuntimeWarning: Parent module 'cage' not found while handling absolute import
import curses
Traceback (most recent call last):
File "<ipython-input-7-74fbffe46b40>", line 1, in <module>
runfile('C:/Users/mds/Dropbox/_python/automata/cage-1.1.4/conway.py', wdir='C:/Users/mds/Dropbox/_python/automata/cage-1.1.4')
File "C:\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 699, in runfile
execfile(filename, namespace)
File "C:\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 74, in execfile
exec(compile(scripttext, filename, 'exec'), glob, loc)
File "C:/Users/mds/Dropbox/_python/automata/cage-1.1.4/conway.py", line 13, in <module>
import curses
File "C:\Anaconda2\lib\curses\__init__.py", line 15, in <module>
from _curses import *
ImportError: No module named _curses
会认为安装 curses 会安装它需要的任何依赖包......
【问题讨论】:
-
如果没有官方安装,那么就没有用于满足依赖的仓库。
-
你的补丁对我有用!