Setup in virtualenv: `pip install -e .` vs `python setup.py install`

喜夏-厌秋 提交于 2019-12-03 13:05:46

First, the commands you mention are not equivalent, specifically python setup.py install does not give you an editable installation. The pip <-> python setup.py equivalents are:

Editable   pip                    setup.py
yes        pip install -e .       python setup.py develop    
no         pip install .          python setup.py install    

With that said, using pip is in general recommended for a range of reasons:

  • Dependencies are automatically installed
  • There is an easy way to uninstall

In your case, I highly suspect that your package has a dependency which is automatically installed if you use pip, but not if you use python setup.py install.

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