简体   繁体   English

我将脚本路径添加到 python 和 Pycharm 说目录中没有 python

[英]I added script path to python and Pycharm says there is no python at the directory

I would like to ask, why Pycharm have problem with script path.我想问一下,为什么Pycharm的脚本路径有问题。 It says there is no python, but there it is.它说没有 python,但确实存在。 Also, I would like to ask why I must add script path when I choose interpreter.另外,我想问一下为什么我选择解释器时必须添加脚本路径。 What is the difference?有什么区别?

https://i.stack.imgur.com/syOfr.png

Interpreter has many roles, it is used at runtime for various purpose, you can read article below解释器有很多角色,它在运行时用于各种目的,你可以阅读下面的文章

https://data-flair.training/blogs/python-interpreter/ https://data-flair.training/blogs/python-interpreter/

While answering to your question why you need to specify path, you need to specify it because you are specifying which python to use for executing your script, it can be your venv python (which is used mostly) or can be system python path.在回答您为什么需要指定路径的问题时,您需要指定它,因为您正在指定要用于执行脚本的 python,它可以是您的 venv python(主要使用),也可以是系统 Z23EEEB4347BDD265BFC6B7EE9A3B75 路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM