aaron19900924
aaron19900924
2017-02-19 01:15

pip install pymongo 总是报错

  • codec
  • windows
  • pip py3.6 爬虫 报错

报错代码如下:
C:\Windows\system32>pip install pymongo
Collecting pymongo
Using cached pymongo-3.4.0.tar.gz
Building wheels for collected packages: pymongo
Running setup.py bdist_wheel for pymongo ... error
Failed building wheel for pymongo
Running setup.py clean for pymongo
Failed cleaning build dir for pymongo
Failed to build pymongo
Installing collected packages: pymongo
Running setup.py install for pymongo ... error
Exception:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\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 0xa1 in position 42: invalid
start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\commands\install.py", lin
e 342, in run
prefix=options.prefix_path,
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\req\req_set.py", line 784
, in install
**kwargs
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\req\req_install.py", line
878, in install
spinner=spinner,
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\utils__init__.py", line
676, in call_subprocess
line = console_to_str(proc.stdout.readline())
File "C:\ProgramData\Anaconda3\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 0xa1 in position 42: invalid
start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\commands\install.py", lin
e 385, in run
requirement_set.cleanup_files()
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\req\req_set.py", line 729
, in cleanup_files
req.remove_temporary_source()
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\req\req_install.py", line
977, in remove_temporary_source
rmtree(self.source_dir)
File "C:\ProgramData\Anaconda3\lib\site-packages\pip_vendor\retrying.py", lin
e 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
File "C:\ProgramData\Anaconda3\lib\site-packages\pip_vendor\retrying.py", lin
e 212, in call
raise attempt.get()
File "C:\ProgramData\Anaconda3\lib\site-packages\pip_vendor\retrying.py", lin
e 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
File "C:\ProgramData\Anaconda3\lib\site-packages\pip_vendor\six.py", line 686
, in reraise
raise value
File "C:\ProgramData\Anaconda3\lib\site-packages\pip_vendor\retrying.py", lin
e 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\utils__init__.py", line
102, in rmtree
onerror=rmtree_errorhandler)
File "C:\ProgramData\Anaconda3\lib\shutil.py", line 488, in rmtree
return rmtree_unsafe(path, onerror)
File "C:\ProgramData\Anaconda3\lib\shutil.py", line 387, in _rmtree_unsafe
onerror(os.rmdir, path, sys.exc_info())
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\utils\
_init__.py", line
114, in rmtree_errorhandler
func(path)
PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'C:\Us
ers\Aaron\AppData\Local\Temp\pip-build-v6n4yggt\pymongo'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\basecommand.py", line 215
, in main
status = self.run(options, args)
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\commands\install.py", lin
e 385, in run
requirement_set.cleanup_files()
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\utils\build.py", line 38,
in exit
self.cleanup()
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\utils\build.py", line 42,
in cleanup
rmtree(self.name)
File "C:\ProgramData\Anaconda3\lib\site-packages\pip_vendor\retrying.py", lin
e 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
File "C:\ProgramData\Anaconda3\lib\site-packages\pip_vendor\retrying.py", lin
e 212, in call
raise attempt.get()
File "C:\ProgramData\Anaconda3\lib\site-packages\pip_vendor\retrying.py", lin
e 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
File "C:\ProgramData\Anaconda3\lib\site-packages\pip_vendor\six.py", line 686
, in reraise
raise value
File "C:\ProgramData\Anaconda3\lib\site-packages\pip_vendor\retrying.py", lin
e 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\utils__init__.py", line
102, in rmtree
onerror=rmtree_errorhandler)
File "C:\ProgramData\Anaconda3\lib\shutil.py", line 488, in rmtree
return rmtree_unsafe(path, onerror)
File "C:\ProgramData\Anaconda3\lib\shutil.py", line 378, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\ProgramData\Anaconda3\lib\shutil.py", line 387, in _rmtree_unsafe
onerror(os.rmdir, path, sys.exc_info())
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\utils\
_init__.py", line
114, in rmtree_errorhandler
func(path)
PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'C:\Us
ers\Aaron\AppData\Local\Temp\pip-build-v6n4yggt\pymongo'

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答