我有很多问题需要安装numpy包。当我执行pip commande
时pip install numpy
我收到以下错误
重试(重试(总计= 4,连接=无,读取=无,重定向=无))连接被' ConnectTimeoutError('连接到pypi.python.org超时)后断开。( connect timeout = 15)')':/ 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!
请帮助。
答案 0 :(得分:0)
您可以随时下载Numpy安装程序
答案 1 :(得分:0)
pip错误表明你有一个pip连接问题。我认为你在尝试运行pip install时没有正确设置你的代理。请检查this question。你可以试试pip的--proxy选项。否则,我不建议任何手动安装numpy。
答案 2 :(得分:-1)
也许是因为网络,您可以重试一次。 (对我有用)