installing multiple python packages by single python file

╄→尐↘猪︶ㄣ 提交于 2019-12-23 01:45:08

问题


How to make a python file, which installs the mentioned python packages, on running that python file in console instead of installing packages one by one as we do by using pip I am also confused with setup.py is it same and if it is how to do please help


回答1:


You can make one text file which has your name of package requirements. Like this is requirement.txt

requests==2.7.0
selenium==3.4.3
Flask==0.10.1
retrying==1.3.3

then you can run it like

pip install -r requirement.txt

Note: Place this txt file to at where the pip is.

And for how this differs from the setup.py you can refer this



来源:https://stackoverflow.com/questions/47941418/installing-multiple-python-packages-by-single-python-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!