尝试安装scipy时出错

时间:2017-04-09 09:41:52

标签: python scipy package

当我尝试将scipy安装为pip install scipy时,我收到此错误,如何解决此问题

C:\Users\Назар>pip install scipy
Collecting scipy
  Using cached scipy-0.19.0.zip
Installing collected packages: scipy
  Running setup.py install for scipy ... error
Exception:
Traceback (most recent call last):
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\compat\__init__.py", line 73, in console_to_str
    return s.decode(sys.__stdout__.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 45: invalid continuation byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\commands\install.py", line 342, in run
    prefix=options.prefix_path,
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_set.py", line 784, in install
    **kwargs
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_install.py", line 878, in install
    spinner=spinner,
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\utils\__init__.py", line 676, in call_subprocess
    line = console_to_str(proc.stdout.readline())
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\compat\__init__.py", line 75, in console_to_str
    return s.decode('utf_8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 45: invalid continuation byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\commands\install.py", line 385, in run
    requirement_set.cleanup_files()
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_set.py", line 729, in cleanup_files
    req.remove_temporary_source()
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_install.py", line 977, in remove_temporary_source
    rmtree(self.source_dir)
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\_vendor\retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\_vendor\retrying.py", line 212, in call
    raise attempt.get()
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\_vendor\retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\_vendor\six.py", line 686, in reraise
    raise value
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\_vendor\retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\utils\__init__.py", line 102, in rmtree
    onerror=rmtree_errorhandler)
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\shutil.py", line 488, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\shutil.py", line 387, in _rmtree_unsafe
    onerror(os.rmdir, path, sys.exc_info())
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\utils\__init__.py", line 114, in rmtree_errorhandler
    func(path)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\5B34~1\\AppData\\Local\\Temp\\pip-build-_6syklw6\\scipy'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\commands\install.py", line 385, in run
    requirement_set.cleanup_files()
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\utils\build.py", line 38, in __exit__
    self.cleanup()
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\utils\build.py", line 42, in cleanup
    rmtree(self.name)
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\_vendor\retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\_vendor\retrying.py", line 212, in call
    raise attempt.get()
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\_vendor\retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\_vendor\six.py", line 686, in reraise
    raise value
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\_vendor\retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\utils\__init__.py", line 102, in rmtree
    onerror=rmtree_errorhandler)
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\shutil.py", line 488, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\shutil.py", line 378, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\shutil.py", line 387, in _rmtree_unsafe
    onerror(os.rmdir, path, sys.exc_info())
  File "c:\users\назар\appdata\local\programs\python\python36-32\lib\site-packages\pip\utils\__init__.py", line 114, in rmtree_errorhandler
    func(path)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\5B34~1\\AppData\\Local\\Temp\\pip-build-_6syklw6\\scipy'

1 个答案:

答案 0 :(得分:1)

实际上问题出在用户名中。所以,要解决这个问题,你需要更改用户名(exp。从俄语到eng)并重新安装python。