question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pipenv doesn't resolve --system python correctly.

See original GitHub issue
Describe you environment
  1. OS Type Docker Alpine Python -> https://github.com/docker-library/python/blob/1d59eb2dd813c64891bf554a8ea01754aba25816/3.6/alpine3.6/Dockerfile
  2. Python version: Python 3.6.3
  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:closed
  • Created 6 years ago
  • Reactions:9
  • Comments:46 (19 by maintainers)

github_iconTop GitHub Comments

19reactions
kennethreitzcommented, Nov 22, 2017

no movement in 30 days. it’ll come back up if its important

10reactions
galuszkakcommented, Nov 22, 2017

@kennethreitz issue is not resolved, can You don’t close things that aren’t fixed yet. Issue is still reproducible.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frequently Encountered Pipenv Problems - Read the Docs
☤ My pyenv-installed Python is not found​​ Make sure you have PYENV_ROOT set correctly. Pipenv only supports CPython distributions, with version name like...
Read more >
pipenv install packages for python is not working
I am new to Python and therefore I am struggling to resolve the following problem. I installed pip and I made a user...
Read more >
Common Pipenv Errors and How to Solve Them: Why Won't it ...
Pipenv looks for the package you specify, whether it exists or not. You see the following errors and many more in the terminal...
Read more >
Pipenv: A Guide to the New Python Packaging Tool
Pipenv is a packaging tool for Python that solves some common problems associated with the typical workflow using pip , virtualenv , and...
Read more >
Can't make pipenv work in cmd - Python - Codecademy Forums
If that's what you get, replace “yourusername” with your username on that PC, and replace “site-packages” with “Scripts” as you're running on ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found