Skip to content
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

Cannot create a 2.7 environment on macOS Monterey #4904

Closed
rsterbin opened this issue Jan 2, 2022 · 4 comments
Closed

Cannot create a 2.7 environment on macOS Monterey #4904

rsterbin opened this issue Jan 2, 2022 · 4 comments
Labels
Type: Documentation 📖 This issue relates to documentation of pipenv.

Comments

@rsterbin
Copy link

rsterbin commented Jan 2, 2022

Issue description

I'm unable to create a 2.7 environment using macOS Monterey. Creating a 3.10 environment works as expected, but 2.7 fails with AttributeError: 'bool' object has no attribute 'error'.

Expected result

Environment created

Actual result

0 [reha@regina ~/git/stmarys/liturgicalendar/original master]$ pipenv --two --verbose
Using python: 2
Path to python: /usr/bin/python2.7
Creating a virtualenv for this project...
Pipfile: /Users/reha/git/stmarys/liturgicalendar/original/Pipfile
Using /usr/bin/python2.7 (2.7.18) to create virtualenv...
⠹ Creating virtual environment...AttributeError: 'bool' object has no attribute 'error'

✘ Failed creating virtual environment
[pipenv.exceptions.VirtualenvCreationException]:
Failed to create virtual environment.

Steps to replicate

Installed pyenv and added 3.9.0, 3.10.0, and 2.7.18. Set 3.10.0 as global. Installed pipenv via pipx. This project does not have a Pipfile.


$ pipenv --support

Pipenv version: '2021.11.23'

Pipenv location: '/Users/reha/.local/pipx/venvs/pipenv/lib/python3.10/site-packages/pipenv'

Python location: '/Users/reha/.local/pipx/venvs/pipenv/bin/python'

Python installations found:

  • 3.10.0: /Users/reha/.pyenv/versions/3.10.0/bin/python3
  • 3.9.0: /Users/reha/.pyenv/versions/3.9.0/bin/python3
  • 3.8.9: /usr/bin/python3
  • 2.7.18: /usr/bin/python
  • 2.7.18: /usr/bin/python2
  • 2.7.18: /usr/bin/python2.7
  • 2.7.18: /Users/reha/.pyenv/versions/2.7.18/bin/python

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.10.0',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '21.2.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:54 PST '
                     '2021; root:xnu-8019.61.5~1/RELEASE_X86_64',
 'python_full_version': '3.10.0',
 'python_version': '3.10',
 'sys_platform': 'darwin'}

System environment variables:

  • NVM_INC
  • VIRTUALENVWRAPPER_SCRIPT
  • TERM_PROGRAM
  • NVM_CD_FLAGS
  • TERM
  • SHELL
  • CLICOLOR
  • TMPDIR
  • TERM_PROGRAM_VERSION
  • TERM_SESSION_ID
  • ANSIBLE_NOCOWS
  • NVM_DIR
  • USER
  • COMMAND_MODE
  • SSH_AUTH_SOCK
  • __CF_USER_TEXT_ENCODING
  • BASH_SILENCE_DEPRECATION_WARNING
  • PAGER
  • WORKON_HOME
  • VIRTUALENVWRAPPER_PYTHON
  • PATH
  • PYENV_VIRTUALENVWRAPPER_PYENV_VERSION
  • LaunchInstanceID
  • __CFBundleIdentifier
  • personal_can_do_color
  • PWD
  • EDITOR
  • LANG
  • ITERM_PROFILE
  • XPC_FLAGS
  • VIRTUALENVWRAPPER_VIRTUALENV
  • PS1
  • XPC_SERVICE_NAME
  • PYENV_SHELL
  • SHLVL
  • HOME
  • COLORFGBG
  • _VIRTUALENVWRAPPER_API
  • LC_TERMINAL_VERSION
  • ITERM_SESSION_ID
  • LOGNAME
  • VIRTUALENVWRAPPER_VIRTUALENV_CLONE
  • NVM_BIN
  • PROMPT_COMMAND
  • LC_TERMINAL
  • SECURITYSESSIONID
  • VIRTUALENVWRAPPER_LAZY_SCRIPT
  • PYENV_VIRTUALENVWRAPPER_PREFER_PYVENV
  • COLORTERM
  • OLDPWD
  • _
  • PIP_SHIMS_BASE_MODULE
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PYTHONDONTWRITEBYTECODE
  • PIP_PYTHON_PATH
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /shims:/Users/reha/.local/bin:/Users/reha/.pyenv/shims:/Users/reha/.nvm/versions/node/v16.11.1/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/usr/local/php5-7.3.8-20190811-205217/bin:/Applications:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/usr/local/MacGPG2/bin:/Library/Apple/usr/bin:/usr/local/go/bin:/Users/reha/go/bin:/Users/reha/.ebcli-virtual-env/executables:/Users/reha/Source/scala-2.13.1/bin
  • SHELL: /bin/bash
  • EDITOR: vim
  • LANG: en_US.UTF-8
  • PWD: /Users/reha/git/stmarys/liturgicalendar/original

@matteius
Copy link
Member

matteius commented Jan 4, 2022

@rsterbin As you know, python 2 reached end of life (EOL) on January 1st, 2020 and is no longer supported. Have you encountered this other thread that maybe is related: #4502 ?

@rsterbin
Copy link
Author

rsterbin commented Jan 6, 2022

Nothing in there seems to be a good match for what I'm seeing.

I'm content to close out this issue and try to migrate the project without a working version -- it's a volunteer project anyway, and the worst that'll happen is some sad feels.

However, I do think it'd be wise to put some sort of disclaimer in the pipenv docs, which feature a lot of examples with python 2 environments, so that the next person looking for a way to resurrect a dead codebase has a more realistic expectation for how that will go.

@matteius
Copy link
Member

matteius commented Jan 7, 2022

@rsterbin That seems like a reasonable suggestion, would you be able to link to the python 2 examples in the docs here for reference? I was checking the Changelog just now and noted that 2021.11.5 is the first release to drop support for Python 2, see also: #4261

Perhaps you would have good results still using pipenv==2021.5.29 for python2, not sure.

@matteius matteius added the Type: Documentation 📖 This issue relates to documentation of pipenv. label Jan 7, 2022
@oz123
Copy link
Contributor

oz123 commented Jan 31, 2022

Related #4938. The support was maybe removed in the package classifiers. In reality, there is still tons of Python2 related code.

@matteius matteius added the PR: awaiting-review The PR related to this issue is awaiting review by a maintainer. label Mar 12, 2022
@matteius matteius closed this as completed Apr 9, 2022
@matteius matteius removed the PR: awaiting-review The PR related to this issue is awaiting review by a maintainer. label Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Documentation 📖 This issue relates to documentation of pipenv.
Projects
None yet
Development

No branches or pull requests

3 participants