-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pipenv using wrong python with pyenv #729
Comments
@AlJohri what is the value returned from python3 --version? Also do you have python_requires in your Pipfile? It looks like you have pyenv configured to give 3.5 precedence for python3. |
|
@nateprewitt It's 3.6.2. My global python is also not 3.5.2, it is:
|
@audiolion I do have
Still seems to be using the wrong version |
Ok if you have python_version in there then it looks like a bug. I don't think |
I'm not at a computer right now so I can't test this out but this sounds like either a very recent regression or some sort of configuration hiccup on your machine. I look at this tonight if no one else gets it first. |
use |
See if that changes anything. |
Pipfile and Pipfile.lock: https://gist.github.com/AlJohri/7e7b68ddad1f9ac6cb1c64dbc8a45670
(python2: command not found is due to the .python-version file)
|
wait, I'm sorry - It seems I was looking at the wrong Pipfile - I didn't have python_requires in this one. Fixing and trying again. |
Yeah, it still seems like there's a bug somewhere but it gave me a proper message now:
|
The confusing part is that I don't have 3.5.3 set anywhere - I pretty much don't use it. It's not in my global pyenv or local. @audiolion yeah, sorry I was looking at an incorrect Pipfile - I posted the updated message above https://github.com/kennethreitz/pipenv/issues/729#issuecomment-332543907. |
Let me try |
Same message:
|
We search through all Pythons that Pyenv has installed, and look for effectively |
you'll have to do a |
fixed! thank you all! 🎉 |
@kennethreitz so the odd behavior was because it was using the first python that starts with python "3" by default since I didn't have |
sounds like it. |
you need to be specific if you want us to be specific :) We can introduce ordering eventually, but it'll slow things down a little bit. |
I propose honouring either the .python-version or |
@aleksijohansson The |
@uranusjr I understand and that makes sense. Relying on |
@kennethreitz I noticed you mentioned that you look for the highest python version pyenv has installed and default to that. I think it could make sense to check if there is a system python version higher than the pyenv pythons too. I only use pyenv to install old python versions and pipenv defaulted to using one of those instead of my systems python3.6 install, which was quite unexpected as user and gave me a bit of a debugging session. Thanks for the great project btw! |
@techalchemy @uranusjr RE this behavior change |
Would be nice, is much harder than it sounds. We have a library for this which actually handles it correctly but integration into the codebase is a huge hurdle. |
Someone integrate PythonFinder please! |
I do this:
Even though Python 3.6 exists. |
I just upgraded my Python from 3.7.1 to 3.7.2 and I started having problem. My simple solution was to run "pipenv rm" and then "pipenv install -r requirements.txt" and the Python in the virtualenv has been updated to 3.7.2, which is what I wanted. |
@GerBreOwn glad you fixed it! |
I believe this might actually be due to |
Started running into this also, in AWS CodeBuild, which uses pyenv. The project's Pipfile is only locked to pipenv kept selecting python 3.9, instead of the pyenv global python 3.8 version from the PATH, or pipenv's own runtime. This workaround gets me past the problem: |
@lorengordon as kennethreitz42 mentioned
So, it looks like if you only specify |
@SergiyKolesnikov I did see that, so I understand what is happening. Sorry, I only meant to offer a different workaround for others experiencing this issue. I had tried |
Hi All, I am facing the same issue, when I try to run the make command, can any one help me to fix it. Warning: Your Pipfile requires python_version 3.7, but you are using None (/home/s/.local/share/v/t/bin/python). |
@AlJohri Please guide me how you did it |
;TLDR for those who ran into this problem:
Replace V with the value of the If you are just starting a new project and do not have a |
Your 2017 fix, helped a 2021 problem :) |
Thank you. |
Hello, my system python version is 3.10, but I wanna run python 3.6 project and I can't figure out how to
|
You can run a Python 3.6 project on your Python 3.10 system in several ways:
OR
|
Pipenv no longer supports python 3.6 |
pipenv is using python 3.5.3 instead of 3.6.2 for some reason
The text was updated successfully, but these errors were encountered: