'zsh: killed python' while executing from virtualenv on macOS Big Sur for Python 2.7
See original GitHub issuezsh: killed python while executing from virtualenv on macOS Big Sur (platform: arm64) for Python 2.7
It is working fine for Python 3.8
Expected result
Python Shell should launch from virtual env shell.
On using pipenv sync should install dependencies.
Actual result
zsh: killed python. Python shell is not launched.
Steps to replicate
- pipenv install --python 2.7
- pipenv shell
- python
Using /usr/bin/python2.7 (2.7.16) to create virtualenv...
⠴ Creating virtual environment...created virtual environment CPython2.7.16.final.0-64 in 216ms
creator CPython2macOsFramework(dest=/Users/ab/.local/share/virtualenvs/demo2-HNdtbnRg, clear=False, global=False)
seeder FromAppData(download=False, pip=bundle, wheel=bundle, setuptools=bundle, via=copy, app_data_dir=/Users/ab/Library/Application Support/virtualenv)
added seed packages: pip==20.2.4, setuptools==44.1.1, wheel==0.35.1
activators PythonActivator,CShellActivator,FishActivator,PowerShellActivator,BashActivator
✔ Successfully created virtual environment!
Failed to load paths:
Output:
Virtualenv location: /Users/ab/.local/share/virtualenvs/demo2-HNdtbnRg
Installing dependencies from Pipfile.lock (3cbc06)...
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
demo2 % pipenv shell
Launching subshell in virtual environment...
. /Users/ab/.local/share/virtualenvs/demo2-HNdtbnRg/bin/activate
demo2 % . /Users/ab/.local/share/virtualenvs/demo2-HNdtbnRg/bin/activate
demo2 % python
zsh: killed python
demo2 % which python
/Users/ab/.local/share/virtualenvs/demo2-HNdtbnRg/bin/python
This works perfectly fine with if I use pipenv install --python 3.8
See details of platform and Python version below (skipped sys env variables)
$ pipenv --support
Pipenv version: '2020.8.13'
Pipenv location: '/Users/ab/Library/Python/2.7/lib/python/site-packages/pipenv'
Python location: '/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python'
Python installations found:
3.8.2:/usr/bin/python32.7.16:/usr/bin/python2.72.7.16:/usr/bin/python2
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '0',
'os_name': 'posix',
'platform_machine': 'arm64',
'platform_python_implementation': 'CPython',
'platform_release': '20.0.0',
'platform_system': 'Darwin',
'platform_version': 'Darwin Kernel Version 20.0.0: Fri Aug 14 00:25:08 PDT 2020; root:xnu-7195.40.44.151.1~4/RELEASE_ARM64_T8020',
'python_full_version': '2.7.16',
'python_version': '2.7',
'sys_platform': 'darwin'}
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/ab/Library/Python/2.7/binSHELL:/bin/zshLANG:en_US.UTF-8
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:36 (2 by maintainers)

Top Related StackOverflow Question
solution:
If you are on Apple M1, mac sure open terminal with Rosetta enabled. it will works fine.