gpt4 book ai didi

python - 安装 pywin32 - win32api.pyd 权限被拒绝

转载 作者:太空狗 更新时间:2023-10-29 22:00:05 27 4
gpt4 key购买 nike

我需要为 rpy2 使用 win32api。所以我去了http://www.lfd.uci.edu/~gohlke/pythonlibs/#pywin32并尝试使用 pip 安装它。但是,我收到以下错误。我怎样才能克服这个权限被拒绝的问题?


C:\Anaconda\Scripts\pip-script.py run on 07/09/15 16:48:30
Unpacking c:\users\myname\downloads\pywin32-219-cp34-none-win_amd64.whl

Installing collected packages: pywin32

Found existing installation: pywin32 218.4

Uninstalling pywin32:

Removing file or directory c:\anaconda\lib\site-packages\pywin32-218.4-py2.7.egg-info
Successfully uninstalled pywin32

Rolling back uninstall of pywin32

Replacing c:\anaconda\lib\site-packages\pywin32-218.4-py2.7.egg-info
Cleaning up...

Exception:
Traceback (most recent call last):
File "C:\Anaconda\lib\site-packages\pip\basecommand.py", line 134, in main
status = self.run(options, args)
File "C:\Anaconda\lib\site-packages\pip\commands\install.py", line 241, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "C:\Anaconda\lib\site-packages\pip\req.py", line 1298, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "C:\Anaconda\lib\site-packages\pip\req.py", line 595, in install
self.move_wheel_files(self.source_dir)
File "C:\Anaconda\lib\site-packages\pip\req.py", line 815, in move_wheel_files
move_wheel_files(self.name, self.req, wheeldir, user=self.use_user_site, home=self.target_dir)
File "C:\Anaconda\lib\site-packages\pip\wheel.py", line 172, in move_wheel_files
clobber(source, lib_dir, True)
File "C:\Anaconda\lib\site-packages\pip\wheel.py", line 166, in clobber
shutil.move(srcfile, destfile)
File "C:\Anaconda\lib\shutil.py", line 301, in move
copy2(src, real_dst)
File "C:\Anaconda\lib\shutil.py", line 130, in copy2
copyfile(src, dst)
File "C:\Anaconda\lib\shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: 'C:\\Anaconda\\Lib\\site-packages\\win32\\win32api.pyd'

最佳答案

如果只是“permission denied”的情况,尝试在pip前添加sudo(注意:必须是@owner/administrator级别)

关于python - 安装 pywin32 - win32api.pyd 权限被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31310251/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com