You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like, when rez-pip runs with a Python version, it attempts to resolve for that version + pip. And if a pip package exists, but not for that Python version, rez-pip fails midway instead of installing the PyPI package using a different resolve.
Reproduction Steps
cd rez
git checkout 2.72.0
python install.py -v ~/rez
export PATH=~/rez/bin/rez:$PATHsource~/rez/completion/complete.sh
rez-bind python
rez-bind pip
rez-bind python --exe `which python3`# In my case, Python 3.6
rez-pip --install parso --python-version=3.6
Error Encountered
Traceback (most recent call last):
File "/home/selecaoone///rez-2.72.0-python-2.7/bin/rez/rez-pip", line 8, in <module>
sys.exit(run_rez_pip())
File "/home/selecaoone/rez-2.72.0-python-2.7/lib/python2.7/site-packages/rez/cli/_entry_points.py", line 178, in run_rez_pip
return run("pip")
File "/home/selecaoone/rez-2.72.0-python-2.7/lib/python2.7/site-packages/rez/cli/_main.py", line 170, in run
returncode = run_cmd()
File "/home/selecaoone/rez-2.72.0-python-2.7/lib/python2.7/site-packages/rez/cli/_main.py", line 162, in run_cmd
return func(opts, opts.parser, extra_arg_groups)
File "/home/selecaoone/rez-2.72.0-python-2.7/lib/python2.7/site-packages/rez/cli/pip.py", line 76, in command
extra_args=opts.extra)
File "/home/selecaoone/rez-2.72.0-python-2.7/lib/python2.7/site-packages/rez/pip.py", line 261, in pip_install_package
py_exe, context = find_pip(pip_version, python_version)
File "/home/selecaoone/rez-2.72.0-python-2.7/lib/python2.7/site-packages/rez/pip.py", line 95, in find_pip
python_version, pip_version=version
File "/home/selecaoone/rez-2.72.0-python-2.7/lib/python2.7/site-packages/rez/pip.py", line 203, in find_pip_from_context
py_exe = find_python_in_context(context)
File "/home/selecaoone/rez-2.72.0-python-2.7/lib/python2.7/site-packages/rez/pip.py", line 142, in find_python_in_context
python_package = context.get_resolved_package("python")
File "/home/selecaoone/rez-2.72.0-python-2.7/lib/python2.7/site-packages/rez/resolved_context.py", line 434, in get_resolved_package
pkgs = [x for x in self._resolved_packages if x.name == name]
TypeError: 'NoneType' object is not iterable
Suggested Fix?
Add this code:
ifcontext.status==ResolverStatus.failed:
print_error('Package request "%s" could not be resolved.', package_request)
returnNone, None, None
When I do this, it fails to resolve the package_request, ["python-3.6", "pip"], but finds another context which it can resolve. And then the package installs properly.
The text was updated successfully, but these errors were encountered:
I have the same problem, I am binding a version of python (installed with asdf) different that the system one and pip is not bind by default. Running rez pip --install with that version doesn't work.
By the way is it possible to bind pip using rez bind?
Because this doesn't work:
Summary
It looks like, when rez-pip runs with a Python version, it attempts to resolve for that version + pip. And if a pip package exists, but not for that Python version, rez-pip fails midway instead of installing the PyPI package using a different resolve.
Reproduction Steps
Error Encountered
Suggested Fix?
Add this code:
Here: https://github.com/nerdvegas/rez/blob/master/src/rez/pip.py#L202
When I do this, it fails to resolve the package_request,
["python-3.6", "pip"]
, but finds another context which it can resolve. And then the package installs properly.The text was updated successfully, but these errors were encountered: