-
-
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 seems to resolve dependencies for Python version on which is pipenv running instead of specified #5803
Comments
I wonder if this was caused by making the resolver not run in a sub-process 🤦 I'll have to give it more consideration. Can you check if the prior version has that issue or not? |
|
I think my issue is also based on this (if this is unrelated after all, I apologize):
As you see, this uses pipenv running on Python 3.11. |
@matteius Thank you very much for a quick fix! I've just tested new release and it works as expected... |
Issue description
I am running pipenv on MacOS using Homebrew which runs it on Python 3.11. However, when I use (also installed) Python 3.10 as my base version, dependencies are still resolved for Python 3.11.
Expected result
When I specify Python 3.10 as my base version, I would expect that dependencies are resolved with respect to target Python version.
Actual result
And when I start
pylint
, I get error:Digging into this issue, I've noticed that
Pipfile.lock
containswrapt
with marker requiring Python 3.11 and thus it won't be installed:When I try to install Pipenv into Python 3.10 venv, it works fine:
...and in
Pipfile.lock
I see:Steps to replicate
Install latest Pipenv using
brew
and try to create env for Python 3.10.Thank you for you help!
$ pipenv --support
Pipenv version:
'2023.7.11'
Pipenv location:
'/opt/homebrew/Cellar/pipenv/2023.7.11/libexec/lib/python3.11/site-packages/pipenv'
Python location:
'/opt/homebrew/Cellar/pipenv/2023.7.11/libexec/bin/python3.11'
OS Name:
'posix'
User pip version:
'23.0.1'
user Python installations found:
PEP 508 Information:
System environment variables:
PATH
MANPATH
TERM_PROGRAM
PYENV_ROOT
TERM
SHELL
HOMEBREW_REPOSITORY
TMPDIR
TERM_PROGRAM_VERSION
TERM_SESSION_ID
ZSH
USER
LS_COLORS
COMMAND_MODE
SSH_AUTH_SOCK
__CF_USER_TEXT_ENCODING
VIRTUAL_ENV_DISABLE_PROMPT
PAGER
LSCOLORS
_
LaunchInstanceID
__CFBundleIdentifier
PWD
JAVA_HOME
DEFAULT_USER
ITERM_PROFILE
XPC_FLAGS
XPC_SERVICE_NAME
PYENV_SHELL
SHLVL
HOME
COLORFGBG
LC_TERMINAL_VERSION
HOMEBREW_PREFIX
ITERM_SESSION_ID
LESS
LOGNAME
LC_CTYPE
INFOPATH
HOMEBREW_CELLAR
LC_TERMINAL
DISPLAY
SECURITYSESSIONID
COLORTERM
PYTHONDONTWRITEBYTECODE
PIP_DISABLE_PIP_VERSION_CHECK
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/Users/user/.pyenv/versions/3.8.16/bin:/Users/user/.pyenv/versions/3.11.2/bin:/Users/user/.pyenv/versions/2.7.18/bin:/opt/homebrew/Cellar/pipenv/2023.7.11/libexec/tools:/opt/homebrew/opt/node@16/bin:/Users/user/.pyenv/shims:/Users/user/bin:/usr/local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/opt/X11/bin:/Applications/Privileges.app/Contents/Resources:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/user/Library/Python/3.9/bin/
SHELL
:/bin/zsh
PWD
:/Users/user/tmp/pipenv_test
Contents of
Pipfile
('/Users/user/tmp/pipenv_test/Pipfile'):Contents of
Pipfile.lock
('/Users/user/tmp/pipenv_test/Pipfile.lock'):The text was updated successfully, but these errors were encountered: