我已经使用该命令安装了一个库
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协议说明符的链接,因此可能不支持.
有没有人能解决我的问题?
我已导出当前活动的环境
conda env export > environment.yml
Run Code Online (Sandbox Code Playgroud)
这非常方便,因为它跟踪conda和pip安装的包.但是,我有一些软件包(例如,整体和底图)由来自Christoph Gohlke的Windows编译软件包的.whl文件中的pip本地安装.当我尝试通过重建我的环境时
conda env create -f environment.yml
Run Code Online (Sandbox Code Playgroud)
pip返回错误,因为它无法在索引中找到这些包(显然).有没有办法在conda导出步骤中告诉pip在哪里查找这些本地包?可以假定.whl文件与environment.yml文件位于同一目录中.