Python 权限访问被拒绝。

huangapple go评论113阅读模式
英文:

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.

Python 权限访问被拒绝。

However, when I tried running the command "python -v" in the terminal, I received an error message stating "permission denied."

Python 权限访问被拒绝。

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

  1. 修复 PHP 警告:vcruntime140.dll 14.0 与此 PHP 构建不兼容

    链接:https://studyopedia.com/errors-resolved/fix-php-warning-vcruntime140-dll-not-compatible/

  2. 修复 Python 权限被拒绝

    在终端中执行 sfc /scannow

英文:

Finally, I used two method solved these error:

  1. 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/

  2. Fix Python Permission Denied

    execute sfc /scannow in terminal.

(These errors are likely due to a computer restart, which resulted in missing files)

huangapple
  • 本文由 发表于 2023年6月19日 14:21:34
  • 转载请务必保留本文链接:https://go.coder-hub.com/76504055.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定