更改 python.exe 文件名后运行 IPython
如果我将 python 解释器从 C:\Python27\python.exe 重命名为 C:\Python27\python27.exe 并运行它,它不会抱怨。
但是,如果我现在尝试运行 C:\Python27\Scripts\ipython.exe,它将无法启动,因为现在 python 解释器具有不同的文件名。
我的问题是:如何配置 IPython (ms windows) 来启动文件名与 python.exe 不同的 python 解释器?
If I rename the python interpreter from C:\Python27\python.exe to C:\Python27\python27.exe and run it, it will not complain.
But if I now try to run C:\Python27\Scripts\ipython.exe, it will fail to start because now the python interpreter has a different filename.
My question is: how do I configure IPython (ms windows) to start up a python interpreter which has a different filename than python.exe?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
尝试在 Windows 注册表中找到 Python 并将路径更改为 python。之后尝试重新安装 ipython。
Try to find Python in windows registry and changes path to python. After that try to reinstall ipython.
我不知道是否有可以更改的配置文件,但您可能必须重新编译 Ipython 并更改解释器变量。但是,当它已经位于 python27 文件夹中时,为什么需要将其重命名为 python27.exe 呢?
I do not know if there is a config file where you can change, but you may have to recompile Ipython and change the interpreter variables. But why do you need to rename it to python27.exe when it already is in a python27 folder?
不要重命名 python.exe,而是确保要运行的 python 的路径位于其他 python 的路径之前
instead of renaming python.exe, make sure the path to the python you want to run is before the path to other pythons
找到了解决办法:
python27.exe c:\Python27\Scripts\ipython-script.py
Found a solution:
python27.exe c:\Python27\Scripts\ipython-script.py