How to use setuptools to install in a custom directory?

后端 未结 2 1279
南笙
南笙 2020-12-16 15:42

I have a Python package that I need to install in the /usr/lib/python2.7/dist-packages or any other specific directory for that matter.

Whenever I run t

相关标签:
2条回答
  • 2020-12-16 16:01

    Since the python setup.py install command is just a shortcut to easy_install, try running it directly, it has the --install-dir option:

    easy_install . --install-dir /usr/lib/python2.7/dist-packages
    

    You can get other available options with python setup.py install -h, in case you need some more, but these are rather cryptic.

    0 讨论(0)
  • 2020-12-16 16:12

    --install-lib sets the installation directory for a module

    python setup.py install --install-lib /src/lib/
    
    0 讨论(0)
提交回复
热议问题