英文:
python permission access denied
问题
在公司笔记本电脑上运行Python脚本的问题
我的设备:
- Python 3.8
- Windows 10 (21H2)
最近我在公司笔记本电脑上运行Python脚本时遇到了问题。
以前,我能够无问题地使用Python,但今天我遇到了一个错误,无法执行.py
脚本。
为了排除问题,我已经检查了python.exe文件并验证了环境变量路径是否设置正确。
但是,当我在终端中尝试运行命令"python -v
"时,我收到了一个错误消息,指出"权限被拒绝"。
我已经咨询了公司的同事,他们确认他们仍然可以像往常一样使用Python而没有任何问题。
我将感激任何协助解决这个问题的帮助。请告诉我如何排除故障并解决这个问题。
升级
此外,我刚刚在Windows事件查看器的系统管理事件下找到了一个"EventID: 4 - 错误: php-8.1.10"事件。
这个事件发生在我没有使用计算机的时候。
因此,我去终端检查了PHP版本,并发现了一个错误:
PHP警告:'C:\\WINDOWS\\SYSTEM32\\VCRUNTIME140.dll' 14.15与此PHP构建链接的14.29不兼容,在Unknown on line 0
突然之间,我无法同时使用Python和PHP,我不确定是否有一个共同的原因导致了这个问题。
有趣的是,在PHP警告发生之前(相隔几秒钟),事件查看器中还有另一个错误,指出"事件:12 - Keeper - 无效访问代码"。
英文:
Issue with running Python scripts on company laptop
My device:
- Python3.8
- Windows10 (21H2)
I have been facing an issue with running Python scripts on my company laptop recently.
Previously, I was able to use Python without any problems, but today I encountered an error where I am unable to execute .py
scripts.
To troubleshoot the issue, I have checked the python.exe file and verified that the environment variables path are set correctly.
However, when I tried running the command "python -v
" in the terminal, I received an error message stating "permission denied."
I have consulted with my colleagues in the company, and they confirmed that they can still use Python as usual without any issues.
I would appreciate any assistance in resolving this problem. Please let me know how I can troubleshoot and fix this issue.
Upgrade
In addition, I just found an "EventID: 4 - Error: php-8.1.10" event in the Windows Event Viewer under System Management Events.
The event occurred during a period when I was not using the computer.
As a result, I went to the terminal to check the PHP version and discovered an error:
PHP Warning: 'C:\\WINDOWS\\SYSTEM32\\VCRUNTIME140.dll' 14.15 is not compatible with this PHP build linked with 14.29 in Unknown on line 0
Suddenly, I am unable to use both Python and PHP, and I'm unsure if there is a common reason behind this issue.
Interestingly, just before the occurrence of the PHP Warning (with a time difference of a few seconds), there was another error in the Event Viewer stating "Event: 12 - Keeper - Invalid access code."
答案1
得分: 0
-
修复 PHP 警告:vcruntime140.dll 14.0 与此 PHP 构建不兼容
链接:https://studyopedia.com/errors-resolved/fix-php-warning-vcruntime140-dll-not-compatible/
-
修复 Python 权限被拒绝
在终端中执行
sfc /scannow
。
英文:
Finally, I used two method solved these error:
-
Fix PHP Warning: vcruntime140.dll 14.0 is not compatible with this PHP build
https://studyopedia.com/errors-resolved/fix-php-warning-vcruntime140-dll-not-compatible/
-
Fix Python Permission Denied
execute
sfc /scannow
in terminal.
(These errors are likely due to a computer restart, which resulted in missing files)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论