【发布时间】:2021-02-24 09:25:03
【问题描述】:
最近我安装了 anaconda。现在,我卸载了 Anaconda 并重新安装了 python 3.6。由于以下错误,我无法安装某些软件包。
Collecting pyinstaller
Using cached pyinstaller-4.0.tar.gz (3.5 MB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\dell\appdata\local\programs\python\python36\python.exe' 'c
:\users\dell\appdata\local\programs\python\python36\lib\site-packages\pip' insta
ll --ignore-installed --no-user --prefix 'C:\Users\DELL\AppData\Local\Temp\pip-b
uild-env-nt65tuv0\overlay' --no-warn-script-location --no-binary :none: --only-b
inary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
cwd: None
Complete output (14 lines):
Traceback (most recent call last):
File "c:\users\dell\appdata\local\programs\python\python36\lib\runpy.py", li
ne 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\dell\appdata\local\programs\python\python36\lib\runpy.py", li
ne 85, in _run_code
exec(code, run_globals)
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages
\pip\__main__.py", line 23, in <module>
from pip._internal.cli.main import main as _main # isort:skip # noqa
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages
\pip\_internal\cli\main.py", line 5, in <module>
import locale
File "c:\users\dell\appdata\local\programs\python\python36\lib\locale.py", l
ine 16, in <module>
import re
File "c:\users\dell\appdata\local\programs\python\python36\lib\re.py", line
142, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\dell\appdata\local\prog
rams\python\python36\python.exe' 'c:\users\dell\appdata\local\programs\python\py
thon36\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\
Users\DELL\AppData\Local\Temp\pip-build-env-nt65tuv0\overlay' --no-warn-script-l
ocation --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 's
etuptools>=40.8.0' wheel Check the logs for full command output.
Traceback (most recent call last):
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_vendor\contextlib2.py", line 468, in __exit__
if cb(*exc_details):
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_vendor\contextlib2.py", line 396, in _exit_wrapper
return cm_exit(cm, *exc_details)
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_internal\utils\temp_dir.py", line 175, in __exit__
self.cleanup()
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_internal\utils\temp_dir.py", line 199, in cleanup
rmtree(ensure_text(self._path))
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_vendor\retrying.py", line 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_vendor\retrying.py", line 212, in call
raise attempt.get()
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_vendor\retrying.py", line 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_vendor\six.py", line 703, in reraise
raise value
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_vendor\retrying.py", line 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_internal\utils\misc.py", line 139, in rmtree
onerror=rmtree_errorhandler)
File "c:\users\dell\appdata\local\programs\python\python36\lib\shutil.py", lin
e 488, in rmtree
return _rmtree_unsafe(path, onerror)
File "c:\users\dell\appdata\local\programs\python\python36\lib\shutil.py", lin
e 378, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "c:\users\dell\appdata\local\programs\python\python36\lib\shutil.py", lin
e 378, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "c:\users\dell\appdata\local\programs\python\python36\lib\shutil.py", lin
e 378, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "c:\users\dell\appdata\local\programs\python\python36\lib\shutil.py", lin
e 383, in _rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
File "c:\users\dell\appdata\local\programs\python\python36\lib\shutil.py", lin
e 381, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\DELL\\AppData\\Local
\\Temp\\pip-install-k22kzs5t\\pyinstaller\\PyInstaller\\bootloader\\Windows-32bi
t\\run.exe'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\dell\appdata\local\programs\python\python36\lib\runpy.py", line
193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\dell\appdata\local\programs\python\python36\lib\runpy.py", line
85, in _run_code
exec(code, run_globals)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python36\Scripts\pip.exe\__m
ain__.py", line 7, in <module>
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_internal\cli\main.py", line 75, in main
return command.main(cmd_args)
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_internal\cli\base_command.py", line 121, in main
return self._main(args)
File "c:\users\dell\appdata\local\programs\python\python36\lib\contextlib.py",
line 89, in __exit__
next(self.gen)
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_internal\cli\command_context.py", line 28, in main_context
yield
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_vendor\contextlib2.py", line 479, in __exit__
_reraise_with_existing_context(exc_details)
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_vendor\contextlib2.py", line 340, in _reraise_with_existing_context
raise exc_details[1]
File "c:\users\dell\appdata\local\programs\python\python36\lib\contextlib.py",
line 100, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_internal\utils\temp_dir.py", line 85, in tempdir_registry
yield _tempdir_registry
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_vendor\contextlib2.py", line 468, in __exit__
if cb(*exc_details):
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_vendor\contextlib2.py", line 396, in _exit_wrapper
return cm_exit(cm, *exc_details)
File "c:\users\dell\appdata\local\programs\python\python36\lib\contextlib.py",
line 89, in __exit__
next(self.gen)
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_internal\utils\temp_dir.py", line 46, in global_tempdir_manager
_tempdir_manager = old_tempdir_manager
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_vendor\contextlib2.py", line 479, in __exit__
_reraise_with_existing_context(exc_details)
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_vendor\contextlib2.py", line 340, in _reraise_with_existing_context
raise exc_details[1]
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_vendor\contextlib2.py", line 468, in __exit__
if cb(*exc_details):
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_vendor\contextlib2.py", line 396, in _exit_wrapper
return cm_exit(cm, *exc_details)
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_internal\utils\temp_dir.py", line 175, in __exit__
self.cleanup()
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_internal\utils\temp_dir.py", line 199, in cleanup
rmtree(ensure_text(self._path))
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_vendor\retrying.py", line 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_vendor\retrying.py", line 212, in call
raise attempt.get()
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_vendor\retrying.py", line 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_vendor\six.py", line 703, in reraise
raise value
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_vendor\retrying.py", line 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File "c:\users\dell\appdata\local\programs\python\python36\lib\site-packages\p
ip\_internal\utils\misc.py", line 139, in rmtree
onerror=rmtree_errorhandler)
File "c:\users\dell\appdata\local\programs\python\python36\lib\shutil.py", lin
e 488, in rmtree
return _rmtree_unsafe(path, onerror)
File "c:\users\dell\appdata\local\programs\python\python36\lib\shutil.py", lin
e 378, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "c:\users\dell\appdata\local\programs\python\python36\lib\shutil.py", lin
e 378, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "c:\users\dell\appdata\local\programs\python\python36\lib\shutil.py", lin
e 378, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "c:\users\dell\appdata\local\programs\python\python36\lib\shutil.py", lin
e 383, in _rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
File "c:\users\dell\appdata\local\programs\python\python36\lib\shutil.py", lin
e 381, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\DELL\\AppData\\Local
\\Temp\\pip-install-k22kzs5t\\pyinstaller\\PyInstaller\\bootloader\\Windows-32bi
t\\run.exe'
这令人沮丧。我也用管理员运行了 cmd,但其他帖子对我不起作用。顺便说一句,我有 Windows 7
【问题讨论】:
标签: python python-3.x python-3.6