Pipenv doesn't resolve --system python correctly.
See original GitHub issueDescribe you environment
- OS Type
Docker Alpine Python
-> https://github.com/docker-library/python/blob/1d59eb2dd813c64891bf554a8ea01754aba25816/3.6/alpine3.6/Dockerfile - Python version:
Python 3.6.3
- Pipenv version:
pipenv, version 8.3.1
Expected result
If I set PIP_PYTHON_PATH it’s ignored and overrided by pipenv (my question is why, what’s reasoning behind that?) because https://github.com/kennethreitz/pipenv/blob/master/pipenv/utils.py#L367 It’s overriding this ENV variable when I use flag --system
. I’ve catched that issue because when building my docker image it was failing on pipenv install --system
Why I know this? Because there is other function that works incorrectly.
'/bin/python'
(Pdb) which('python')
'/bin/python'
(Pdb) print(sys.executable)
'/usr/local/bin/python'
/ # /bin/python
sh: /bin/python: not found
I think issue is somewhere here: https://github.com/kennethreitz/pipenv/blob/1bf6f5101a3bf1dca78be814e742411cc5bdb2dd/pipenv/cli.py#L1440
p = os.sep.join([location] + ['bin/{0}'.format(command)])
this should return /usr/local/bin/python
but for some strange reason it’s returning /bin/python
Actual result
pipenv install --system
should install not failed that /bin/python is not found.
Steps to replicate
pipenv install --system
on that docker image will fail
Issue Analytics
- State:
- Created 6 years ago
- Reactions:9
- Comments:46 (19 by maintainers)
Top GitHub Comments
no movement in 30 days. it’ll come back up if its important
@kennethreitz issue is not resolved, can You don’t close things that aren’t fixed yet. Issue is still reproducible.