[英]Command errored out with exit status 1 and access denied
Recently I installed anaconda. Now, I uninstalled Anaconda and reinstalled python 3.6.最近装了anaconda,现在卸载了Anaconda,重新装了python 3.6。 I am not a able to install some packages because of the following error.
由于以下错误,我无法安装某些软件包。
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'
This has been frustrating.这一直令人沮丧。 I ran cmd with administrator too but other post aren't working for me.
我也和管理员一起运行了 cmd,但其他帖子对我不起作用。 btw I have windows 7
顺便说一句,我有 windows 7
The error message - "PermissionError: [WinError 5] Access is denied: '... Windows-32bit\run.exe'" suggests that a 32-bit version file is being run, and hence is being denied access.错误消息 - “PermissionError: [WinError 5] Access is denied: '... Windows-32bit\run.exe'”表明正在运行 32 位版本文件,因此被拒绝访问。
The problem may get solved by removing the existing version of Python from Windows and then installing the 64-bit version afresh.从 Windows 中删除 Python 的现有版本,然后重新安装 64 位版本可能会解决此问题。
Tip for successful installation and hassle-free upgrade:成功安装和无忧升级的提示:
Manually create the installation directory with small path, without spaces and with 'write' permissions for installing python, instead of the default one offered by the installer.手动创建小路径、无空格且具有“写入”权限的安装目录以安装 python,而不是安装程序提供的默认目录。
The installer installs to C:\users\name\app data\...... This path usually causes problems while upgrading Python.安装程序安装到 C:\users\name\app data\...... 这个路径在升级 Python 时通常会出问题。
Tip:提示:
Create a folder named C:\python3 (for installing python v3) and give 'write' permission to it to the user.创建一个名为C:\python3的文件夹(用于安装 python v3)并向用户授予“写入”权限。
Select C:\python3 as the installation directory during the installation. Select C:\python3作为安装时的安装目录。
This will help install python and also upgrade it without hassles in the future.这将有助于安装 python 并在将来轻松升级它。
When I faced the error, I closed cmd. I started cmd with administrator and fired the command nvm use 12.10.0
and it worked for me.当我遇到错误时,我关闭了 cmd。我用管理员启动了 cmd 并触发了命令
nvm use 12.10.0
,它对我有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.