从python从github安装一个模块的方法和位置 [英] How and where to install a module in python from github
问题描述
我需要从 github 安装一个模块(pyrise)。这是因为我需要修改它,稍后提交更改并请求一个拉请求。
如果我安装pip,我得到通常的pyrise文件夹与 __ init __。py
在根级别。
所以我用pip和dis(在$ code>网站包文件夹)
git clone git@github.com:nicoladj77 / pyrise.git
cd pyrise
python setup.py install
这个安装正确的一切,但现在我有一个 pyrise
文件夹在 site-packages
和另一个 pyrise
文件夹内 pyrise
。
第一个 pyrise
有一个空的 __ init __。py
,因此,当我执行
import pyrise
我不能访问任何对象,因为正确的 __ init __。py
在第二个 pyrise
文件夹内。 / p>
我在做什么错?我是否安装在错误的目录?
尝试使用开发安装
:
git clone git @ github.com:nicoladj77 / pyrise.git
cd pyrise
python setup.py开发
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?
Try installing it with develop
:
git clone git@github.com:nicoladj77/pyrise.git
cd pyrise
python setup.py develop
这篇关于从python从github安装一个模块的方法和位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!