无法在Windows 10“权限被拒绝"上运行Python 3.7. [英] Unable to run Python 3.7 on Windows 10 "Permission denied"

查看:85
本文介绍了无法在Windows 10“权限被拒绝"上运行Python 3.7.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当尝试使用Git Bash在Windows 10上运行Python 3.7时,出现以下错误:

When trying to run Python 3.7 on Windows 10 with Git Bash I get the following error:

$ python --version
bash: /c/Users/Name/AppData/Local/Microsoft/WindowsApps/python: Permission denied

该怎么办?

我通过使用scoop安装python并使用cmder而不是Git Bash安装了python,从而解决了(或更避免了).

I solved (or rather circumvented) this by installing python using scoop and using cmder instead of Git Bash.

推荐答案

实际上并未安装Python.那是一个可以打开Windows应用商店的填充程序,但是它只能在PowerShell或CMD中运行(并且有时只能正确运行).我建议访问Python网站并从那里下载并安装.

Python isn't actually installed. That's a shim which should open the Windows store, but it only works from PowerShell or CMD (and only does that correctly some of the time). I recommend visiting the Python website and downloading and installing from there.

这是宣布此功能"的博客文章: https://devblogs.microsoft.com/python/python-in-the-windows-10-may-2019-update/

Here is the blog post announcing this "feature": https://devblogs.microsoft.com/python/python-in-the-windows-10-may-2019-update/

这篇超级用户文章讨论了解决方案: https://superuser.com/问题/1437590/typing-python-on-windows-10-version-1903-command-prompt-opens-microsoft-stor

This SuperUser article discussed solutions: https://superuser.com/questions/1437590/typing-python-on-windows-10-version-1903-command-prompt-opens-microsoft-stor

这篇关于无法在Windows 10“权限被拒绝"上运行Python 3.7.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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