权限被拒绝的错误:Windows Gitbash上的Python 3.8 [英] Permission Denied error: Python 3.8 on Windows Gitbash

查看:898
本文介绍了权限被拒绝的错误:Windows Gitbash上的Python 3.8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Python的新手. 我在GitBash上执行python --version时收到以下错误. ... Appdata/Local/Microsoft/WindowsApps/python3:权限被拒绝

New to Python. I get the following error on doing a python --version on my GitBash. ...Appdata/Local/Microsoft/WindowsApps/python3: Permission Denied

基于此论坛上的一些答案,我关闭了python的App执行别名.这样做会从Windows App文件夹中删除两个存根" python.exe和python3.exe,并导致另一个错误,即在GitBash上我的python --version没有此类文件或目录.

Based on some answers on this forum I turned off the App execution aliases for python. Doing this deleted the two "stubs" python.exe and python3.exe from my Windows App folder and resulted in another error of No such file or directory to my python --version on GitBash.

我是python的新手,因此卡在安装本身上会很烦人.我在这里想念什么???

I am a novice to python so it gets annoying to be stuck at the installation itself. What am I missing here ???

现在是12月,我认为来自Microsoft的所有这些更新仍未解决此问题.还是?

It's December and all these updates from Microsoft I assume has still not fixed this issue. Or?

推荐答案

要解决此问题,您需要安装所需的Python-Windows-Version(在我的情况下是3.9). 然后,在开始菜单中搜索Edit environment variables for your account. 打开PATH -Variable并移动PATH %USERPROFILE%\AppData\Local\Microsoft\WindowsApps在Python安装路径的下面.

To fix this Problem you need to install the required Python-Windows-Version (In my case it was 3.9). Then you search for Edit environment variables for your account in the startmenu. Open up the PATH-Variable and move the PATH for %USERPROFILE%\AppData\Local\Microsoft\WindowsApps below the PATH of your Python-Installation.

现在,您在Windows搜索中输入manage app execution aliases,并在其中停用python的2个条目.

Now you enter manage app execution aliases into the windows search and deactivate the 2 Entrys for python there.

您需要做的最后一件事是打开Python安装文件夹. 该文件夹通常位于%USERPROFILE%\AppData\Local\Programs\Python\Python39(如果您使用的是Python 3.9) 不要忘记更改您的Python版本(例如Python38)的路径.

The last thing you need to do is to open your Python-Installation-Folder. This folder is usually at %USERPROFILE%\AppData\Local\Programs\Python\Python39 (If you're using Python 3.9) Don't forget to change the path to your Python-version (e.g. Python38).

将文件python.exe复制到同一目录中,并将副本重命名为python3.exe.因此,安装文件夹中同时包含python.exepython3.exe.

Copy the file python.exe in the same directory and rename the copy to python3.exe. So you have both python.exe and python3.exe in the installation-folder.

您可以在此处

这篇关于权限被拒绝的错误:Windows Gitbash上的Python 3.8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆