<>环境变量!他们可以在命令行上指定路径吗? [英] <>Environment Variables! Can they get around specifying the path on the command line?

查看:94
本文介绍了<>环境变量!他们可以在命令行上指定路径吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不知何故,当我第一次安装Python 2.5时,它不会让我跑。我查找了如何处理环境变量,它得到修复... Sorta ...


然后,当我想从命令提示符运行一个程序时,它就不会不运行,给我一个错误,说某某不是可执行文件。现在我试着这样做,搞砸了我的东西!


有什么帮助吗?

Somehow, when I first installed Python 2.5, it wouldn''t let me run. I looked up what to do with the environment variables, and it got fixed... Sorta...

Then when I wanted to run a program off of command prompt, it wouldn''t run, giving me an error that said that so and so is not an executable. Now I tried to do this, it screwed up my thing!

Any help?

推荐答案


不知何故,当我第一次安装Python 2.5时,它不会让我跑。我查找了如何处理环境变量,它得到修复... Sorta ...


然后,当我想从命令提示符运行一个程序时,它就不会不运行,给我一个错误,说某某不是可执行文件。现在我试着这样做,搞砸了我的东西!


有什么帮助吗?
Somehow, when I first installed Python 2.5, it wouldn''t let me run. I looked up what to do with the environment variables, and it got fixed... Sorta...

Then when I wanted to run a program off of command prompt, it wouldn''t run, giving me an error that said that so and so is not an executable. Now I tried to do this, it screwed up my thing!

Any help?



右键单击我的电脑。转到属性:高级选项卡。单击环境变量按钮(位于底部)。在用户名变量中,请确保使用D:\ python25;之类的内容。在PATH变量中。应该这样做。

Right click My Computer. Go to Properties: Advanced tab. Click Environment Varialbles button (at the bottom). In User Variables for Your Name, make sure that someting like "D:\python25;" is in the PATH variable. That should do it.


那么有效......在我将ANYTHING更改为环境变量之前,我必须恢复到系统还原以后再返回,然后我不得不更新一些程序...只是乱七八糟......


无论如何,既然我有python工作,我如何让程序在其中运行?


有关PATHEXT的事,我很有信心。但是我不知道如何标记它。
Well that worked... After I had to revert to a System Restore to go back before I changed ANYTHING to the Environment Variables, then I had to update a few programs... just a mess...

Anyway, now that I have python working, how do I get the programs to run in it?

Something about PATHEXT, I''m sure. But I don''t know how to label it.



那么有效...我必须恢复到系统还原在我将ANYTHING更改为环境变量之前返回,然后我不得不更新一些程序......只是一团糟...


无论如何,现在我已经运行了python,如何让程序在其中运行?


有关PATHEXT的一些信息,我很有信心。但我不知道如何标记它。
Well that worked... After I had to revert to a System Restore to go back before I changed ANYTHING to the Environment Variables, then I had to update a few programs... just a mess...

Anyway, now that I have python working, how do I get the programs to run in it?

Something about PATHEXT, I''m sure. But I don''t know how to label it.



让你的脚本运行,只需输入

c:\> python file.py

to get your script to run, just type
c:\> python file.py


这篇关于<>环境变量!他们可以在命令行上指定路径吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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