Installing python module within code

前端 未结 7 1192
孤独总比滥情好
孤独总比滥情好 2020-11-21 23:31

I need to install a package from PyPi straight within my script. Maybe there\'s some module or distutils (distribute, pip etc.) featur

7条回答
  •  温柔的废话
    2020-11-22 00:06

    You define the dependent module inside the setup.py of your own package with the "install_requires" option.

    If your package needs to have some console script generated then you can use the "console_scripts" entry point in order to generate a wrapper script that will be placed within the 'bin' folder (e.g. of your virtualenv environment).

提交回复
热议问题