[英]Run python module commands on Windows
I installed Sphinx using pip install sphinx
command in Windows Terminal and I want to run sphinx-quickstart
to make documentation in my docs
directory but it doesn't work.我在 Windows 终端中使用pip install sphinx
命令安装了 Sphinx,我想运行sphinx-quickstart
在我的docs
目录中制作文档,但它不起作用。
I get this error instead:我收到了这个错误:
sphinx-quickstart : The term 'sphinx-quickstart' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
If I try to run it via GitBash or using py
or python
at the beginning that says:如果我尝试通过 GitBash 或在开头使用py
或python
运行它,则说明:
\path_to_python\python.exe: can't open file '\My_working_directory\docs\sphinx-quickstart': [Errno 2] No such file or directory
How can I solve this problem?我怎么解决这个问题?
The easiest way to do it is to create simple virtual environment and you will able to install packages you want and run it.最简单的方法是创建简单的虚拟环境,您将能够安装所需的软件包并运行它。
Just create folder and run command to create virtual environment then just activate it using .bat
file.只需创建文件夹并运行命令来创建虚拟环境,然后使用.bat
文件激活它。
Read the docs but it can differ in future versions of Python.阅读文档,但在 Python 的未来版本中可能会有所不同。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.