在python setup.py develop遇到python PermissionError: [WinError 5]拒绝访问

本文指导如何在Windows系统上关闭与Python相关的程序(如Jupyter,PyCharm等),然后给予用户完全控制权限,包括定位Anaconda安装路径并设置权限,以解决可能的问题。

第一步:

关闭跟python相关的所有程序,如jupyter,pycharm,Anaconda等等,这一步非常重要!!!

第二步:

赋予用户对python的“完全控制”的权限,步骤如下:

找到按照python的位置,本文用的是Anaconda,安装在D盘,位置为:D:\Anaconda3。找到python- 右键- 属性- 安全- 点击“组或用户名”中,选择Users- 编辑- 点击点击“组或用户名”中的Users- 把“完全控制”打钩- 应用- OK

第三步:

执行完第二步一般就能解决问题。如果还没解决问题的话,找到安装python的文件夹,本人用的是Anaconda3,那么就直接对该文件夹,右键属性,按照第二步的方法执行一遍就OK了!

当然,如果用的pycharm或其他软件安装的python,那么就找到你安装位置的那个文件夹,同理右键- 属性,执行第二步的方法, 搞定!

error: subprocess-exited-with-error × python setup.py develop did not run successfully. │ exit code: 1 ╰─> [40 lines of output] running develop D:\ancan\envs\yolov8\lib\site-packages\setuptools\command\develop.py:41: EasyInstallDeprecationWarning: easy_install command is deprecated. !! ******************************************************************************** Please avoid running ``setup.py`` and ``easy_install``. Instead, use pypa/build, pypa/installer or other standards-based tools. See https://github.com/pypa/setuptools/issues/917 for details. ******************************************************************************** !! easy_install.initialize_options(self) D:\ancan\envs\yolov8\lib\site-packages\setuptools\_distutils\cmd.py:90: SetuptoolsDeprecationWarning: setup.py install is deprecated. !! ******************************************************************************** Please avoid running ``setup.py`` directly. Instead, use pypa/build, pypa/installer or other standards-based tools. See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. ******************************************************************************** !! self.initialize_options() running egg_info writing detectron2.egg-info\PKG-INFO writing dependency_links to detectron2.egg-info\dependency_links.txt writing requirements to detectron2.egg-info\requires.txt writing top-level names to detectron2.egg-info\top_level.txt reading manifest file 'detectron2.egg-info\SOURCES.txt' adding license file 'LICENSE' writing manifest file 'detectron2.egg-info\SOURCES.txt' running build_ext D:\ancan\envs\yolov8\lib\site-packages\torch\utils\cpp_extension.py:414: UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。 warnings.warn(f'Error checking compiler version for {compiler}: {error}') building 'detectron2._C' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × python setup.py develop did not run successfully. │ exit code: 1 ╰─> [40 lines of output] running develop D:\ancan\envs\yolov8\lib\site-packages\setuptools\command\develop.py:41: EasyInstallDeprecationWarning: easy_install command is deprecated. !! ******************************************************************************** Please avoid running ``setup.py`` and ``easy_install``. Instead, use pypa/build, pypa/installer or other standards-based tools. See https://github.com/pypa/setuptools/issues/917 for details. ******************************************************************************** !! easy_install.initialize_options(self) D:\ancan\envs\yolov8\lib\site-packages\setuptools\_distutils\cmd.py:90: SetuptoolsDeprecationWarning: setup.py install is deprecated. !! ******************************************************************************** Please avoid running ``setup.py`` directly. Instead, use pypa/build, pypa/installer or other standards-based tools. See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. ******************************************************************************** !! self.initialize_options() running egg_info writing detectron2.egg-info\PKG-INFO writing dependency_links to detectron2.egg-info\dependency_links.txt writing requirements to detectron2.egg-info\requires.txt writing top-level names to detectron2.egg-info\top_level.txt reading manifest file 'detectron2.egg-info\SOURCES.txt' adding license file 'LICENSE' writing manifest file 'detectron2.egg-info\SOURCES.txt' running build_ext D:\ancan\envs\yolov8\lib\site-packages\torch\utils\cpp_extension.py:414: UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。 warnings.warn(f'Error checking compiler version for {compiler}: {error}') building 'detectron2._C' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. 为什么
06-27
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

TracyGC

创作不易,需要花花~

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值