Python-从github安装库 [英] Python - installing libraries from github

查看:55
本文介绍了Python-从github安装库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用最新的Azure SDK库.我最初是使用PIP安装库的,没有任何问题.找到了已发布的较新功能,但我的图书馆中没有可用的功能.因此,我尝试通过PIP重新安装这些库.不好...然后我经历了从Github克隆存储库,然后从源代码安装它的过程.一切顺利,但我的代码无法使用这些新功能.

I am trying to work with the newest Azure SDK library. I originally installed the libraries using PIP and haven't had any issues. Found a newer feature that was released but I didn't have it available in my library. So I tried to re-install the libraries via PIP. No good... Then I went through the process of cloning the repo from Github and then installing it from source. It went through without errors, but the new features weren't available to my code.

浏览下载的代码,我可以看到功能是我从Github提取的代码,但是它并没有安装到Python可以看到它的地方.似乎在运行setup.py时,安装是在其他地方进行的.我不确定此时该做什么或确保我正在运行最新代码的最佳方法.

Digging into the downloaded code, I can see the feature is the code I pulled from Github but it is just not getting installed to where Python can see it. It seems that when running setup.py, the installation is happening somewhere else. I'm not sure what to do at this point or what the best way to make sure I am running the most recent code.

我应该以某种方式删除PIP最初安装的所有内容吗?(不确定如何执行此操作)还是需要将python指向库所在的位置?(担心会出现混乱,因为目前有两种情况.

Should I somehow remove everything that PIP installed originally? (not sure how to do that) or do I need to point python to where the libraries are? (concerned that there will be confusion since there is currently two of everything.

谢谢

推荐答案

您应该直接从github点安装.

You should just pip install straight from github.

pip uninstall <package-name>

pip install git+<link-to-repo.git>

这篇关于Python-从github安装库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆