I'm a new beginner in Python and trying to install cython in Windows 7 (i use Anaconda to code with python). I meet a problem when installing cython in my computer:
E:\Python\Cython-0.24>python setup.py install
Unable to find pgen, not compiling formal grammar.
running install
running bdist_egg
running egg_info
writing top-level names to Cython.egg-info\top_level.txt
writing entry points to Cython.egg-info\entry_points.txt
writing Cython.egg-info\PKG-INFO
writing dependency_links to Cython.egg-info\dependency_links.txt
reading manifest file 'Cython.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.pyx' under directory 'Cython\Debugger\Tests'
warning: no files found matching '*.pxd' under directory 'Cython\Debugger\Tests'
warning: no files found matching '*.h' under directory 'Cython\Debugger\Tests'
warning: no files found matching '*.pxd' under directory 'Cython\Utility'
writing manifest file 'Cython.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
running build_ext
Traceback (most recent call last):
File "setup.py", line 326, in <module>
**setup_args
File "C:\Anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Anaconda3\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Anaconda3\lib\site-packages\setuptools-18.4-py3.5.egg\setuptools\comm
and\install.py", line 67, in run
File "C:\Anaconda3\lib\site-packages\setuptools-18.4-py3.5.egg\setuptools\comm
and\install.py", line 109, in do_egg_install
File "C:\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Anaconda3\lib\site-packages\setuptools-18.4-py3.5.egg\setuptools\comm
and\bdist_egg.py", line 160, in run
File "C:\Anaconda3\lib\site-packages\setuptools-18.4-py3.5.egg\setuptools\comm
and\bdist_egg.py", line 146, in call_command
File "C:\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Anaconda3\lib\site-packages\setuptools-18.4-py3.5.egg\setuptools\comm
and\install_lib.py", line 10, in run
File "C:\Anaconda3\lib\distutils\command\install_lib.py", line 107, in build
self.run_command('build_ext')
File "C:\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "E:\Python\Cython-0.24\Cython\Distutils\build_ext.py", line 164, in run
_build_ext.build_ext.run(self)
File "C:\Anaconda3\lib\distutils\command\build_ext.py", line 307, in run
force=self.force)
File "C:\Anaconda3\lib\distutils\ccompiler.py", line 1031, in new_compiler
return klass(None, dry_run, force)
File "C:\Anaconda3\lib\distutils\cygwinccompiler.py", line 282, in __init__
CygwinCCompiler.__init__ (self, verbose, dry_run, force)
File "C:\Anaconda3\lib\distutils\cygwinccompiler.py", line 126, in __init__
if self.ld_version >= "2.10.90":
TypeError: unorderable types: NoneType() >= str()
E:\Python\Cython-0.24>
How can i solve it and successfully install cython? Thank you !
答案 0 :(得分:0)
如果您使用Anaconda,安装新模块时的第一个停靠点应该是使用conda:
conda install cython
这将安装二进制包,避免任何编译(这意味着您不需要安装C / C ++编译器)。
偶尔你会遇到一个未提供的模块,在这种情况下可以这样做:
pip install nameofmissingmodule