[英]I'm trying to create a virtual environment in Python 3 but can't get it set up
[英]I'm trying to set up python in notepad++ and it can't understand my filepath that has a space in it
我正在使用本教程: https : //silentcrash.com/2016/12/run-python-script-notepad/
Python 3的示例包括文件夹“ Program Files(x86)”,我认为这不是必需的,但是我仍然想知道如果将来出现此问题时如何解决此问题,而我没有其他方法做到这一点。
因此,发生的情况是程序假定空格是命令的结尾,并且继续前进到参数,如下所示:
The system cannot find the file specified.
An attempt was made to execute the below command.
------------------------------------------------
Command: C:\Program
Arguments: Files\Python37\Lib\idlelib.py "new 2"
Error Code: 2
有什么办法可以写入文件路径,从而不会像这样被分割?
当参数包含空格时,需要用引号将其引起来。 在您的示例中,您将在“运行...”对话框中使用以下命令:
"C:\Program Files\Python37\Lib\idlelib.py" "$(FULL_CURRENT_PATH)"
我在superuser.com上找到了一个有用的提示,该提示将在脚本完成后停止关闭控制台窗口。 但是,请注意,它现在需要一组额外的引号。
cmd /k ""C:\Program Files\Python37\Lib\idlelib.py" "$(FULL_CURRENT_PATH)""
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.