You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

安装PyJNIus遇PermissionError: [WinError 5]拒绝访问,求解决方案

PermissionError: [WinError 5] Access Denied When Installing PyJNIus on Windows

I'm hitting a PermissionError: [WinError 5] Access denied while trying to install PyJNIus on my Windows PC. I've gone through multiple troubleshooting steps but none have fixed the problem:

  • Ran CMD as administrator
  • Configured PyCharm and my Python files to run with administrator privileges
  • Used the command pip install --user PyJNIus
  • Tried python -m pip install --user PyJNIus
  • Closed PyCharm entirely then ran CMD as admin to execute the install command
  • Verified I have full read/write permissions for all related files and directories

Here's the full error log from running python -m pip install --user PyJNIus:

C:\WINDOWS\system32>python -m pip install --user PyJNIus
Collecting PyJNIus
Using cached pyjnius-1.2.1.tar.gz (40 kB)
ERROR: Command errored out with exit status 1:
 command: 'C:\Users\tom\AppData\Local\Programs\Python\Python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\tom\\AppData\\Local\\Temp\\pip-install-ueh9n_76\\PyJNIus\\setup.py'"'"'; __file__='"'"'C:\\Users\\tom\\AppData\\Local\\Temp\\pip-install-ueh9n_76\\PyJNIus\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\tom\AppData\Local\Temp\pip-install-ueh9n_76\PyJNIus\pip-egg-info'
 cwd: C:\Users\tom\AppData\Local\Temp\pip-install-ueh9n_76\PyJNIus\
Complete output (15 lines):
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\tom\AppData\Local\Temp\pip-install-ueh9n_76\PyJNIus\setup.py", line 92, in <module>
    compile_native_invocation_handler(*get_possible_homes(PLATFORM))
  File "C:\Users\tom\AppData\Local\Temp\pip-install-ueh9n_76\PyJNIus\setup.py", line 82, in compile_native_invocation_handler
    subprocess.check_call([
  File "C:\Users\tom\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 359, in check_call
    retcode = call(*popenargs, **kwargs)
  File "C:\Users\tom\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 340, in call
    with Popen(*popenargs, **kwargs) as p:
  File "C:\Users\tom\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\tom\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 1307, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
PermissionError: [WinError 5] Access denied

I'm really stuck here—any advice or solutions to get past this permission issue would be greatly appreciated!

内容的提问来源于stack exchange,提问作者Kit Wai

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.07 09:12:46