windows10 用户不能运行 python,只能运行 admin [英] windows10 user cannot run python, only admin

查看:56
本文介绍了windows10 用户不能运行 python,只能运行 admin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一整天都在尝试使用谷歌让它工作,但无济于事.python 作为管理员在 cmd 中运行良好,但我的用户无法运行它(vs 代码也不起作用),试图永久设置变量但没有任何效果.我的 pythonhome/path 变量中仍然有一个非常旧的 python 路径,当我更改它时,它会在下一个 cmd 启动时恢复.使用 set pythonpath=C:\PROGRAMDATA\PYTHON\PYTHON39 设置后,它会暂时工作但当然不是下一次,也不是在 VS 代码中

I've been trying to get this to work using google all day to no avail. python works fine in a cmd as admin but my user can't run it (also vs code doesn't work), tried to set the variable permanently but nothing works. I still have a very old python path in my pythonhome/path variable and when I change it, it reverts back at the next cmd start. It works temporarily after setting it with set pythonpath=C:\PROGRAMDATA\PYTHON\PYTHON39 but then of course not the next time and also not in VS code

抱歉,如果信息不够,我很乐意提供任何进一步需要的东西

sorry if this isn't enough information, I'll be glad to deliver anything further needed

推荐答案

那是因为你只添加了Administrator的路径.

That's because you only add the path to Administrator.

打开环境变量,在User variable for username中,选择Path,点击New,然后通过pythonpath:

Open Environment Variables, In User variable for username, choose Path, click New, then past the pythonpath :

这篇关于windows10 用户不能运行 python,只能运行 admin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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