2017-02-28 4 views
0

내 지식 pip 설치. [extras_require here]는 항상 효과가있었습니다. 그 기능이 추가되었을 때 나는 어떤 문서에서도 찾을 수 없지만 아주 오래된 기계에서도 결코 문제가 없었습니다.pip install. [테스트] python2.7.9 pip 버전 6.0.7에서 작동하지 않습니다.

분명히 문제가 여기 있습니다. 'pip install --upgrade pip'를 추가 할 수는 있지만 현재 문제가있는 repo에 병합 권한이 없습니다. 3.5.2에서 파이썬 2.7.9

$ python --version 
Python 2.7.9 
$ pip --version 
pip 6.0.7 from /home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages (python 2.7) 
$ pip install .[test] 
Collecting .[test] 
    Could not find any downloads that satisfy the requirement .[test] 
    No distributions at all found for .[test] 


The command "pip install .[test]" failed and exited with 1 during . 

에서 setup.py

extras_require={ 
    'test': ['flake8', 'pytest>=2.9.0'], 
}, 

에서

:

$ python --version 
Python 3.5.2 
$ pip --version 
pip 9.0.1 from /home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages (python 3.5) 
$ pip install .[test] 
Processing /home/travis/build/Brian-Williams/repo_python 
Collecting flake8 (from refactor-me==0.1.0) 
    Downloading flake8-3.3.0-py2.py3-none-any.whl (66kB) 
    100% |████████████████████████████████| 71kB 6.1MB/s 
Requirement already satisfied: pytest>=2.9.0 in /home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages (from refactor-me==0.1.0) 
Collecting pycodestyle<2.4.0,>=2.0.0 (from flake8->refactor-me==0.1.0) 
    Downloading pycodestyle-2.3.1-py2.py3-none-any.whl (45kB) 
    100% |███████████████���████████████████| 51kB 10.6MB/s 
Collecting mccabe<0.7.0,>=0.6.0 (from flake8->refactor-me==0.1.0) 
    Downloading mccabe-0.6.1-py2.py3-none-any.whl 
Collecting pyflakes<1.6.0,>=1.5.0 (from flake8->refactor-me==0.1.0) 
    Downloading pyflakes-1.5.0-py2.py3-none-any.whl (225kB) 
    100% |████████████████████████████████| 225kB 7.1MB/s 
Requirement already satisfied: py>=1.4.29 in /home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages (from pytest>=2.9.0->refactor-me==0.1.0) 
Installing collected packages: pycodestyle, mccabe, pyflakes, flake8, refactor-me 
    Running setup.py install for refactor-me ... - done 
Successfully installed flake8-3.3.0 mccabe-0.6.1 pycodestyle-2.3.1 pyflakes-1.5.0 refactor-me-0.1.0 
+0

이전 버전의 pip에서 지원 된 것처럼 보입니다. [here] (http://stackoverflow.com/questions/4796936/does-pip-handle-extras-requires-from-setuptools-distribute-based-sources)를 참조하십시오. – Brian

답변

1

핍의 버전에 당신은

를 실행해야
pip install -e .[test] 

~ be able to install extras from a directory

+0

그게 내가하고있는 일이다. .travis.yml :''pip install '. [test] "'' – Brian

+0

당신은하지 않습니다. '-e'가 누락되었습니다. –

+0

-e는 편집기 모드로 설치 중입니다.이 모드는 코드가 편집되지 않고 완료된 컨테이너가 제거되는 CI 작업의 일부이므로 불필요합니다. 나는 또한 아래의 문제를 해결하여 pip를 업그레이드하고 여전히 에디터 모드로 설치하지는 않습니다. 아무런 이유가 없을 때 가변 코드를 사용하는 것은 나쁜 생각입니다. – Brian

0

나는 병합 액세스 권한이있다. 그것을 고정 .travis.yml의 설치 단계로 업그레이드 핍 추가 :

install: 
    # update pip to ensure extras_require format is supported 
    - 'pip install --upgrade pip' 
    - 'pip install ".[test]"' 

을 핍-9.0.1과 6.0.7를 교체 성공적인 실행에서 델타이었다.