如何将Python路径从使用Mingw64的路径转换为Windows 11中的原始Windows路径
我已经安装了最新版本的Python(3.10.5),并尝试编写一些代码,发现某些模块在运行时不起作用。当我尝试通过PowerShell或CMD检查版本时,它表明
Python 3.9.13(Main,5月19日,2022,07:22:26)[GCC 11.3.0 64位(AMD64)]
,然后我意识到它是使用mingw64的Python编译器 我试图改变环境变量,但认为我不会惹它。 我想更改通往原始Windows路径的路径。
I have installed the latest version of Python (3.10.5) and I tried writing some code and found that some of the modules are not working while running. When I tried to check the version through powershell or cmd it shows that
Python 3.9.13 (main, May 19 2022, 07:22:26) [GCC 11.3.0 64 bit (AMD64)] on win32
Then I realized that it is using the MINGW64's python compiler
I tried to change the environmental variables but thought I would not mess with it.
I want to change the path to the original Windows path.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我和你有同样的问题。我已经安装了Python 3.10.5,但是当我使用
python -version
检查Python版本时,它仍在版本3.9.7中。我所做的是在“ Edit Enviroment变量”中添加Python的默认路径。添加以下路径:
及其将2个路径带到2路径上。路径以使其具有更高的优先级。如果您的Python版本正确,请再次检查终端。如果仍然显示以前的版本,则可能需要关闭CMD并重新打开它们。
我希望这会有所帮助。
干杯。
I had the same problem with you. I already installed Python 3.10.5 but when I check the python version with
python --version
, it was still in version 3.9.7.What I did is add the default path of the python in the "Edit Enviroment variable". Add the following path:
And then bring the 2 path above the mingw64 path so that it will have a higher priority. Check again in terminal if this time your python version is correct. If it's still show previous version, you might want to close your cmd and reopen them again.
I hope this helps.
Cheers.