How and where to install a module in python from github

血红的双手。 提交于 2019-12-24 05:34:59

问题


i need to install a module (pyrise) from github. This is because i need to modify it and later on commit the changes and ask for a pull request.

If i install with pip i get the usual pyrise folder with the __init__.py at root level.

So i unistalled with pip and dis ( in the site-packages folder )

git clone git@github.com:nicoladj77/pyrise.git
cd pyrise
python setup.py install

this installed correctly everything, but now i have a pyrise folder under site-packages and another pyrise folder inside pyrise. And the first pyrise has an empty __init__.py and for this reason when i do

import pyrise

i can't access any object, because the proper __init__.py is inside the second pyrise folder.

What am i doing wrong?Am i installing it in the wrong dir?


回答1:


Try installing it with develop:

git clone git@github.com:nicoladj77/pyrise.git
cd pyrise
python setup.py develop


来源:https://stackoverflow.com/questions/16081724/how-and-where-to-install-a-module-in-python-from-github

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