Closed threegirl2014 closed 6 years ago
is elasticsearch-dsl
on your pypi server?
Wait is this a bug? It looks like one package is hosted locally and it’s dependencies are on pypi. Both servers need to be in your pipfile.
yes, of course. @kennethreitz
this is the only requests
situation:
(test_pipenv3-0zRcCNVK) zhangrujia@zhangrujias-MacBook-Pro:~/script/test_pipenv3 » pipenv lock --verbose 1 ↵
Locking [dev-packages] dependencies…
Using pip: -i http://mirrors.aliyun.com/pypi/simple/
ROUND 1
Current constraints:
Finding the best candidates:
Finding secondary dependencies:
------------------------------------------------------------
Result of round 1: stable, done
Locking [packages] dependencies…
Using pip: -i http://mirrors.aliyun.com/pypi/simple/
ROUND 1
Current constraints:
requests
Finding the best candidates:
Please check your version specifier and version number. See PEP440 for more information.
Using pip: -i http://mirrors.aliyun.com/pypi/simple/
ROUND 1
Current constraints:
requests
Finding the best candidates:
Please check your version specifier and version number. See PEP440 for more information.
Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
You can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Could not find a version that matches requests
Tried: (no version found at all)
Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
You can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Could not find a version that matches requests
Tried: (no version found at all)
well, when I use pip install xxx
, this pypi source works correctly.
is requests
on your PyPI server?
└[~/script/test_pipenv4]> pipenv install
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
You can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Could not find a version that matches requests
Tried: (no version found at all)
/Library/Python/2.7/site-packages/pipenv/utils.py:1157: ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/var/folders/x4/fpjn14k11gdfw96th7bg7z4c0000gn/T/pipenv-WBSDme-requirements'>
warnings.warn(warn_message, ResourceWarning)
└[~/script/test_pipenv4]> pipenv install --skip-lock
Installing dependencies from Pipfile…
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 1/1 — 00:00:03
only the lock function be affected, the installing always give me result. @kennethreitz
(test_pipenv4-fmshV4Om) script/test_pipenv4 » pip list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
certifi (2018.1.18)
chardet (3.0.4)
idna (2.6)
pip (9.0.1)
requests (2.18.4)
setuptools (38.5.2)
urllib3 (1.22)
wheel (0.30.0)
(test_pipenv4-fmshV4Om) script/test_pipenv4 » pipenv graph
requests==2.18.4
- certifi [required: >=2017.4.17, installed: 2018.1.18]
- chardet [required: >=3.0.2,<3.1.0, installed: 3.0.4]
- idna [required: >=2.5,<2.7, installed: 2.6]
- urllib3 [required: <1.23,>=1.21.1, installed: 1.22]
they are all in my enviroment. @techalchemy
when the package is only a urllib3
which does not have sub-dependences, the lock function also gives me this message:
>> pipenv lock --verbose 21:06.23 二 3 13 2018 >>>
Locking [dev-packages] dependencies…
Using pip: -i http://mirrors.aliyun.com/pypi/simple/
ROUND 1
Current constraints:
Finding the best candidates:
Finding secondary dependencies:
------------------------------------------------------------
Result of round 1: stable, done
Locking [packages] dependencies…
Using pip: -i http://mirrors.aliyun.com/pypi/simple/
ROUND 1
Current constraints:
urllib3
Finding the best candidates:
Please check your version specifier and version number. See PEP440 for more information.
Using pip: -i http://mirrors.aliyun.com/pypi/simple/
ROUND 1
Current constraints:
urllib3
Finding the best candidates:
Please check your version specifier and version number. See PEP440 for more information.
Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
You can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Could not find a version that matches urllib3
Tried: (no version found at all)
Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
You can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Could not find a version that matches urllib3
Tried: (no version found at all)
@kennethreitz @techalchemy
this appears to be fixed in master (using bandersnatch as a mirror)
I upgrade pipenv to the latest version 11.7.1. but this problem doesn't be fixed.
so I try to find something in the raw code:
def prepare_pip_source_args(sources, pip_args=None):
if pip_args is None:
pip_args = []
if sources:
# Add the source to pip9.
pip_args.extend(['-i', sources[0]['url']])
# Trust the host if it's not verified.
if not sources[0].get('verify_ssl', True):
pip_args.extend(['--trusted-host', urlparse(sources[0]['url']).netloc.split(':')[0]])
# Add additional sources as extra indexes.
if len(sources) > 1:
for source in sources[1:]:
pip_args.extend(['--extra-index-url', source['url']])
# Trust the host if it's not verified.
if not source.get('verify_ssl', True):
pip_args.extend(['--trusted-host', urlparse(source['url']).netloc.split(':')[0]])
return pip_args
I set the verfiy_ssl=false
in the Pipfile when the source url is http://mirrors.aliyun.com/pypi/simple/
.
and it works!
maybe this message can help you.
Yes, that is a requirement :)
ENV: Pipenv version:
'11.6.0'
Pipenv location:
'/Library/Python/2.7/site-packages/pipenv'
PEP 508 Information:
the requirements.txt is this:
when pipfile is this:
excute pipenv lock --verbose, the result is wrong:
however, if I change the Pipfile like this(change the source):
or just add one extra source:
the result is right:
and the Pipfile.lock is:
while, the pipenv graph execute always correctly:
so, what is the problem or what should I do?