【发布时间】:2017-04-22 05:29:20
【问题描述】:
我有很多问题要安装 numpy 包。当我执行 pip 命令时
pip install numpy
我收到以下错误
连接被 'ConnectTimeoutError(, '连接到 pypi.python.org 超时。(连接超时 = 15)' 后重试 (Retry(total=4, connect=None, read=None, redirect=None)) )': /simple/numpy/找不到满足numpy要求的版本(来自版本:) 没有找到 numpy 的匹配分布
当我使用easy_insall 命令时,我得到以下错误
搜索 numpy 超时 -- 可能找不到某些包! 找不到“numpy”的索引页(可能拼写错误?) 所有包裹的扫描索引(这可能需要一段时间) 阅读https://pypi.python.org/simple/ https://pypi.python.org/simple/ 上的下载错误:超时 -- 可能找不到某些包! 没有找到 numpy 的本地包或下载链接 错误:找不到 Requirement.parse('numpy') 的合适分布
当我使用手动添加包时
python setup.py install
我收到以下错误:
Running from numpy source directory.
Cythonizing sources
numpy/random\mtrand\randint_helpers.pxi.in has not changed
Processing numpy/random\mtrand\mtrand.pyx
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named 'Cython'
Traceback (most recent call last):
File "C:\Hazem\Python packages\numpy\tools\cythonize.py", line 70, in process_pyx
r = subprocess.call(['cython'] + flags + ["-o", tofile, fromfile])
File "C:\Users\Hazem\AppData\Local\Programs\Python\Python35\lib\subprocess.py", line 560, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Users\Hazem\AppData\Local\Programs\Python\Python35\lib\subprocess.py", line 950, in __init__
restore_signals, start_new_session)
File "C:\Users\Hazem\AppData\Local\Programs\Python\Python35\lib\subprocess.py", line 1220, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Hazem\Python packages\numpy\tools\cythonize.py", line 220, in <module>
main()
File "C:\Hazem\Python packages\numpy\tools\cythonize.py", line 216, in main
find_process_files(root_dir)
File "C:\Hazem\Python packages\numpy\tools\cythonize.py", line 208, in find_process_files
process(cur_dir, fromfile, tofile, function, hash_db)
File "C:\Hazem\Python packages\numpy\tools\cythonize.py", line 167, in process
processor_function(fromfile, tofile)
File "C:\Hazem\Python packages\numpy\tools\cythonize.py", line 81, in process_pyx
raise Exception('Cython failed')
Exception: Cython failed
Traceback (most recent call last):
File "setup.py", line 391, in <module>
setup_package()
File "setup.py", line 374, in setup_package
generate_cython()
File "setup.py", line 212, in generate_cython
raise RuntimeError("Running cythonize failed!")
RuntimeError: Running cythonize failed!
需要帮助。
【问题讨论】:
标签: python numpy python-3.5