我已经使用该命令安装了一个库
pip install git+git://github.com/mozilla/elasticutils.git
Run Code Online (Sandbox Code Playgroud)
它直接从Github存储库安装它.这工作正常,我希望在我的requirements.txt.我看其他的票像这样但这并没有解决我的问题.如果我把类似的东西
-f git+git://github.com/mozilla/elasticutils.git
elasticutils==0.7.dev
Run Code Online (Sandbox Code Playgroud)
在requirements.txt文件中,pip install -r requirements.txt结果如下:
Downloading/unpacking elasticutils==0.7.dev (from -r requirements.txt (line 20))
Could not find a version that satisfies the requirement elasticutils==0.7.dev (from -r requirements.txt (line 20)) (from versions: )
No distributions matching the version for elasticutils==0.7.dev (from -r requirements.txt (line 20))
Run Code Online (Sandbox Code Playgroud)
需求文件的文档没有提到使用git+git协议说明符的链接,因此可能不支持.
有没有人能解决我的问题?
我刚刚开始使用setuptools和virtualenv.我的包需要最新的python-gearman,只能从GitHub获得.PyPI上的python-gearman版本是旧版本.Github源代码是setuptools兼容的,即有setup.py等.有没有办法让setuptools下载并安装新版本,而不是在PyPI上查找并安装旧版本?
仅供参考,新的python-gearman是http://github.com/mtai/python-gearman
我是Python的新手,所以这可能听起来很傻.
我想使用我在Github上找到的Python库,让我们说https://github.com/praw-dev/praw,我希望git pull将来能够提取最新的提交.
问题:我应该git clone <git url>在项目目录中删除除praw目录之外的所有内容,然后在我的python脚本中做一个import praw?
在iPython中,
import praw
Run Code Online (Sandbox Code Playgroud)
给出了错误 ImportError: No module named praw
目录结构
~\myProject\
praw\
myNotebook.ipynb
Run Code Online (Sandbox Code Playgroud) 我想通过pip安装Django 1.7.它目前是一个开发版本,因此不在pips存储库中.
所以我在使用之前已经从github安装了包:
pip install git+[url here]
Run Code Online (Sandbox Code Playgroud)
现在看github,我在django页面上获得了克隆url:
https://github.com/django/django.git
Run Code Online (Sandbox Code Playgroud)
但是这没有提及分支.如何指定我想要1.7版本?它是否在github页面上显而易见?
您好,我需要从 git 存储库的分支安装。我想将其包含在requirements.txt中,以便它可以使用命令安装pip install -r requirements.txt
我所知道的是如何从 master 分支安装(请参阅下面的 git ssh 条目):
这是我的requirements.txt
networkx==2.4
numpy==1.18.1
opencv-python==4.2.0.32
scipy==1.4.1
git+ssh://git@gitlab.com/project/project-utils.git
Run Code Online (Sandbox Code Playgroud)
如果我想从特定分支(1-fix-test即ssh://git@gitlab.com/project/project-utils.git.
如何在 ssh 地址中包含分支名称?
我已经将我的私人回购打包成一个轮子。有不同版本的轮子。是否可以从命令行使用 pip 和通过 requirements.txt 文件安装特定轮版本的 repo?据我所知,pip 文档中没有提到此功能。
我可以使用 Github 令牌从私有存储库安装 pip 包,没有问题。
pip install git+https://$GITHUB_TOKEN@github.com/[username]/[reponame].git
我还可以安装带有特定提交的私有 pip 包:
pip install git+https://$GITHUB_TOKEN@github.com/[username]/[reponame].git@[commit_sha]
我正在尝试使用simple_salesforce来使用Python查询salesforce数据.我正在使用我的用户名和密码,我100%肯定是正确的.我从登录Salesforce并查看我的公司资料中获得了组织ID.这只是一个15位数的ID.我特意使用orgID来避免使用安全令牌,因为我不知道它是什么.我究竟做错了什么?
码:
from simple_salesforce import Salesforce
sf = Salesforce(instance_url='https://na1.salesforce.com', session_id='')
sf = Salesforce(password='password', username='email', organizationId='15 digit org id')
Run Code Online (Sandbox Code Playgroud)
输出:
File "C:\Python27\lib\site-packages\simple_salesforce\api.py", line 100, in __init__
proxies=self.proxies)
File "C:\Python27\lib\site-packages\simple_salesforce\login.py", line 124, in SalesforceLogin
code=except_code, message=except_msg))
simple_salesforce.login.SalesforceAuthenticationFailed: INVALID_LOGIN: Invalid username, password, security token; or user locked out.
Run Code Online (Sandbox Code Playgroud) 与git repo branch的pip install类似
虽然,它仍然无法正常工作.这是github和bitbucket之间的区别吗?
我正在使用FROM python:latestdocker镜像和我的dockerfileRUN pip install -r requirements.txt
我的requirements.txt有:
-e git+https://bitbucket.org/nicfit/eyed3.git@py3#egg=eyed3
Run Code Online (Sandbox Code Playgroud)
但它给出了错误:
致命:未找到存储库' https://bitbucket.org/nicfit/eyed3.git/ '
类似于:从git repo分支安装pip
虽然您可以使用以下语法从git repo分支/提交安装:
pip install git+https://github.com/tangentlabs/django-oscar-paypal.git@issue/34/oscar-0.6
Run Code Online (Sandbox Code Playgroud)
如何指定要与子模块(递归)进行克隆的pip?
背景
我有两个python项目.项目A和项目B.
每个项目都有自己的虚拟环境和自己的setup.py.
这两个项目都不是纯py文件,并且具有"构建"过程,如构建扩展,生成源等.
A依赖于B(B上的setup.py install_requires点).
每个项目都作为一个轮子构建和发布/分发到pypi内部部署存储库.
pip install w/wo -e(项目A的开发模式),很好地将项目B安装到项目A venv站点包中.
到目前为止,一切都运行良好,"按书".
现在,我的故事变得复杂......
我想一起开发这两个项目,而不必按顺序A发布B来使用它.
例如,我想:
我实际上想要项目A的pip install -e也可以在开发模式下安装项目B.
经过一些阅读后,我理解(希望是正确的)可以通过--find-links标志将"分发"定义为本地源文件夹.
我在--find-links中定义了项目B根文件夹.
我尝试了(在项目A setup.py文件夹上):
点子安装.-e --find-links = file:/// path/to/B.
点子安装.-e --find-links = git + file:// path/to/B.
两者都没用.
BTW,在通往B轮或B蛋的路径中,
例如:pip安装.-e --find-links = file:///path/to/B.whl
确实有效,但这不是我想要的.
希望你还在我身边:-)(对于这个乏味的故事感到抱歉)
我错过了什么?
TX
python ×9
git ×6
pip ×5
github ×4
python-2.7 ×2
python-wheel ×2
setuptools ×2
bitbucket ×1
distutils ×1
django ×1
ipython ×1
pypi ×1
python-3.x ×1
salesforce ×1
soap ×1