簡體   English   中英

使用git存儲庫軟件包PIP安裝錯誤

[英]PIP install error with git repository packages

我現在需要部署一個舊的django項目。 我需要安裝此項目中使用的確切版本。

在這個項目的requirements.txt中有一些來自GIT repos的軟件包。

使用時安裝這些要求

pip install -r requirements.txt拋出以下錯誤。

  File "/home/nyros/Desktop/new/rmkenv/local/lib/python2.7/site-packages/pip/req.py", line 70, in __init__
    req = pkg_resources.Requirement.parse(req)
  File "/home/nyros/Desktop/new/rmkenv/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources.py", line 2606, in parse
    reqs = list(parse_requirements(s))
  File "/home/nyros/Desktop/new/rmkenv/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources.py", line 2544, in parse_requirements
    line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
  File "/home/nyros/Desktop/new/rmkenv/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources.py", line 2512, in scan_list
    raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in', 'django_filebrowser-origin/HEAD', 'at', '/HEAD')

Storing debug log for failure in /home/nyros/.pip/pip.log

我認為問題在於requirements.txt中的git urls。 請檢查以下requirements.txt並告訴我要修改的安裝要求。

-e hg+https://bitbucket.org/descent/django-aloha@844a88f99fba4fd3e29771fe85d6c611e66cd2e5#egg=django_aloha-dev

-e git+https://github.com/Bouke/django-filebrowser-no-grappelli.git@a367570e795288281be303f7c2505803f7a48543#egg=django_filebrowser-origin/HEAD



-e git+https://github.com/toastdriven/django-haystack.git@4d90d7d6c77ebf7ee298f2de941b1f41d99caf1d#egg=django_haystack-master



-e git+https://github.com/jowolf/django-ide.git@a2aa7a8ae41298c4635ba6c8c3b634a130c653d9#egg=django_ide-master

-e git+https://github.com/bread-and-pepper/django-userena.git@5beff3929f261694f9af03f940e500586e2a60d3#egg=django_userena-origin/HEAD



-e git+https://github.com/pythonforfacebook/facebook-sdk@a12457671d3cb6265c52d9e8ef1ea2b387299fe3#egg=facebook_sdk-master

從github導入特定提交的表單不需要https,也不需要在導入結束時使用/ HEAD。 請參閱以下導入以獲取django的開發分支:

-e git://github.com/django/django.git@8568e7cfa4fb87cd0a9ead1b3fbb7a39d19e98b9#egg=django

刪除這些部分,看看是否能解決您的問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM