[英]Installing External Python Module using Command Line - No Command Supplied
I am trying to install a python module manually without pip
or easy_install
in Python 3. At first I tried (after cd
to the folder containing the setup.py
file): 我试图在Python 3中手动安装不带pip
或easy_install
的python模块。起初,我尝试过(在cd
到包含setup.py
文件的文件夹之后):
python setup.py install
However, I recieved an error: 但是,我收到一个错误:
'python' is not recognized as an internal or external command, operable program or batch file. 无法将“ python”识别为内部或外部命令,可操作程序或批处理文件。
After a little research , I realised that without the python
it should work: 经过一些研究 ,我意识到没有python
应该可以工作:
setup.py install
This also gave me an error: 这也给了我一个错误:
error: no command supplied 错误:未提供命令
More researching told me to go back to python setup.py install
(which doesn't work), and following these instructions and following links hasn't worked either. 更多研究告诉我,请返回python setup.py install
(该命令无效),并且遵循这些说明和以下链接也无效。
I would appreciate any help in installing this module (the module being BeautifulSoup4
). 在安装此模块(模块为BeautifulSoup4
)方面的任何帮助,我将不胜感激。
This probably means your python.exe
is not in your PATH
. 这可能意味着您的python.exe
不在PATH
。
Invoking setup.py
directly works because of Windows' file associations. 由于Windows的文件关联,因此直接调用setup.py
即可。
The Python manual actually has an entry on how to set up your PATH , but its instructions are for Windows < 7, so here goes: Python手册实际上包含有关如何设置PATH的条目 ,但其说明适用于Windows <7。
;C:\\Python3;C:\\Python3\\Scripts
(or wherever your Python is) to the PATH environment variable (preferably in the System variables section). 将;C:\\Python3;C:\\Python3\\Scripts
(或Python所在的位置)添加到PATH环境变量中(最好在“系统变量”部分中)。 It's handy to have the Scripts
directory in there too, to be able to easily run pip
and other scripts. 同样也有Scripts
目录,可以轻松运行pip
和其他脚本。 python
. 试试python
。 Should work. 应该管用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.