我尝试为python 3.5.2安装numpy + mkl,但是得到以下错误。有没有办法来解决这个问题?旧的numpy版本可能被破坏吗?
C:\WINDOWS\system32>pip3 install C:\Users\CTX383\Downloads\numpy-1.12.1+mkl-cp35-cp35m-win_amd64.whl
Processing c:\users\CTX383\downloads\numpy-1.12.1+mkl-cp35-cp35m-win_amd64.whl
Installing collected packages: numpy
Found existing installation: numpy 1.12.0
Exception:
Traceback (most recent call last):
File "c:\users\CTX383\appdata\local\programs\python\python35\lib\site-packages\pip\basecommand.py", line 209, in main
status = self.run(options, args)
File "c:\users\CTX383\appdata\local\programs\python\python35\lib\site-packages\pip\commands\install.py", line 317, in run
prefix=options.prefix_path,
File "c:\users\CTX383\appdata\local\programs\python\python35\lib\site-packages\pip\req\req_set.py", line 726, in install
requirement.uninstall(auto_confirm=True)
File "c:\users\CTX383\appdata\local\programs\python\python35\lib\site-packages\pip\req\req_install.py", line 699, in uninstall
for path in pip.wheel.uninstallation_paths(dist):
File "c:\users\CTX383\appdata\local\programs\python\python35\lib\site-packages\pip\wheel.py", line 533, in unique
for item in fn(*args, **kw):
File "c:\users\CTX383\appdata\local\programs\python\python35\lib\site-packages\pip\wheel.py", line 552, in uninstallation_paths
r = csv.reader(FakeFile(dist.get_metadata_lines('RECORD')))
File "c:\users\CTX383\appdata\local\programs\python\python35\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1624, in get_metadata_lines
return yield_lines(self.get_metadata(name))
File "c:\users\CTX383\appdata\local\programs\python\python35\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1621, in get_metadata
return self._get(self._fn(self.egg_info, name)).decode("utf-8")
File "c:\users\CTX383\appdata\local\programs\python\python35\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1727, in _get
with open(path, 'rb') as stream:
FileNotFoundError: [Errno 2] No such file or directory: 'c:\\users\\CTX383\\appdata\\local\\programs\\python\\python35\\lib\\site-packages\\numpy-1.12.0.dist-info\\RECORD'
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
C:\WINDOWS\system32>
答案 0 :(得分:0)
使用管理员权限打开CMD
。
然后,
mkdir c:\\users\\CTX383\\appdata\\local\\programs\\python\\python35\\lib\\site-packages\\numpy-1.12.0.dist-info
然后输入您要做的事情。