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

2018.11.14 pipenv emits pythons errors when creating a virtualenv #3229

Closed
command-tab opened this issue Nov 15, 2018 · 3 comments
Closed

2018.11.14 pipenv emits pythons errors when creating a virtualenv #3229

command-tab opened this issue Nov 15, 2018 · 3 comments
Labels
Type: Bug 🐛 This issue is a bug. Type: Regression This issue is a regression of a previous behavior. Type: Vendored Dependencies This issue affects vendored dependencies within pipenv.

Comments

@command-tab
Copy link

Issue description

$ pipenv --two
Error %s while executing command %s [Errno 2] No such file or directory: '/usr/local/bin/pythonz': '/usr/local/bin/pythonz' /usr/local/bin/pythonz -c import sys; print(sys.version.split()[0])
['Traceback (most recent call last):\n', '  File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/vistir/contextmanagers.py", line 148, in spinner\n    yield _spinner\n', '  File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/vistir/misc.py", line 309, in run\n    start_text=start_text\n', '  File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/vistir/misc.py", line 157, in _create_subprocess\n    combine_stderr=combine_stderr)\n', '  File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/vistir/misc.py", line 132, in _spawn_subprocess\n    return subprocess.Popen(cmd, **options)\n', '  File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 709, in __init__\n    restore_signals, start_new_session)\n', '  File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1344, in _execute_child\n    raise child_exception_type(errno_num, err_msg, err_filename)\n', "FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/bin/pythonz': '/usr/local/bin/pythonz'\n"]
Error %s while executing command %s [Errno 2] No such file or directory: '/usr/local/bin/pythonz': '/usr/local/bin/pythonz' /usr/local/bin/pythonz -c import sys; print(sys.version.split()[0])
['Traceback (most recent call last):\n', '  File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/vistir/contextmanagers.py", line 148, in spinner\n    yield _spinner\n', '  File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/vistir/misc.py", line 309, in run\n    start_text=start_text\n', '  File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/vistir/misc.py", line 157, in _create_subprocess\n    combine_stderr=combine_stderr)\n', '  File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/vistir/misc.py", line 132, in _spawn_subprocess\n    return subprocess.Popen(cmd, **options)\n', '  File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 709, in __init__\n    restore_signals, start_new_session)\n', '  File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1344, in _execute_child\n    raise child_exception_type(errno_num, err_msg, err_filename)\n', "FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/bin/pythonz': '/usr/local/bin/pythonz'\n"]

Expected result

Expected no error logging while simply creating a virtualenv

Actual result

virtualenv creation appears to have worked, but unexpected errors were emitted.

Steps to replicate

  1. Run pipenv --two to create a Python 2.7 virtualenv
  2. Observe errors
$ pipenv --support

Pipenv version: '2018.11.14'

Pipenv location: '/usr/local/lib/python3.6/site-packages/pipenv'

Python location: '/usr/local/opt/python/bin/python3.6'

Python installations found:

Error %s while executing command %s [Errno 2] No such file or directory: '/usr/local/bin/pythonz': '/usr/local/bin/pythonz' /usr/local/bin/pythonz -c import sys; print(sys.version.split()[0])
['Traceback (most recent call last):\n', ' File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/vistir/contextmanagers.py", line 148, in spinner\n yield _spinner\n', ' File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/vistir/misc.py", line 309, in run\n start_text=start_text\n', ' File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/vistir/misc.py", line 157, in _create_subprocess\n combine_stderr=combine_stderr)\n', ' File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/vistir/misc.py", line 132, in _spawn_subprocess\n return subprocess.Popen(cmd, **options)\n', ' File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 709, in init\n restore_signals, start_new_session)\n', ' File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1344, in _execute_child\n raise child_exception_type(errno_num, err_msg, err_filename)\n', "FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/bin/pythonz': '/usr/local/bin/pythonz'\n"]
Error %s while executing command %s [Errno 2] No such file or directory: '/usr/local/bin/pythonz': '/usr/local/bin/pythonz' /usr/local/bin/pythonz -c import sys; print(sys.version.split()[0])
['Traceback (most recent call last):\n', ' File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/vistir/contextmanagers.py", line 148, in spinner\n yield _spinner\n', ' File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/vistir/misc.py", line 309, in run\n start_text=start_text\n', ' File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/vistir/misc.py", line 157, in _create_subprocess\n combine_stderr=combine_stderr)\n', ' File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/vistir/misc.py", line 132, in _spawn_subprocess\n return subprocess.Popen(cmd, **options)\n', ' File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 709, in init\n restore_signals, start_new_session)\n', ' File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1344, in _execute_child\n raise child_exception_type(errno_num, err_msg, err_filename)\n', "FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/bin/pythonz': '/usr/local/bin/pythonz'\n"]

  • 3.6.5: /usr/local/bin/python3
  • 3.6.5: /usr/local/bin/python3.6m
  • 2.7.15: /usr/local/bin/python
  • 2.7.15: /usr/local/bin/pythonw
  • 2.7.10: /usr/bin/python
  • 2.7.10: /usr/bin/pythonw
  • 2.7.10: /usr/bin/python2.7

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.6.5',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '17.7.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT '
                     '2018; root:xnu-4570.71.2~1/RELEASE_X86_64',
 'python_full_version': '3.6.5',
 'python_version': '3.6',
 'sys_platform': 'darwin'}

System environment variables:

  • LC_ALL
  • PYENV_VIRTUALENV_DISABLE_PROMPT
  • LANG
  • XPC_FLAGS
  • HISTCONTROL
  • LESS
  • DISPLAY
  • TERM_SESSION_ID
  • EDITOR
  • __CF_USER_TEXT_ENCODING
  • GIT_EDITOR
  • SSH_AUTH_SOCK
  • USER
  • PAGER
  • LSCOLORS
  • ROOT
  • RBENV_SHELL
  • SSH_CLIENT_USER
  • PWD
  • MANPAGER
  • HOME
  • TERM_PROGRAM
  • TERM_PROGRAM_VERSION
  • Apple_PubSub_Socket_Render
  • SVN_EDITOR
  • TMPDIR
  • PIPENV_NOSPIN
  • XPC_SERVICE_NAME
  • TERM
  • SHELL
  • TNS_ADMIN
  • VAULT_ADDR
  • PYTHONDONTWRITEBYTECODE
  • SHLVL
  • MANPATH
  • LOGNAME
  • PATH
  • PIPENV_HIDE_EMOJIS
  • GCCDIR
  • HOMEBREW_GITHUB_API_TOKEN
  • _
  • OLDPWD
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PIP_SHIMS_BASE_MODULE
  • PIP_PYTHON_PATH
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

  • PIPENV_NOSPIN: 1
  • PIPENV_HIDE_EMOJIS: 1

Debug–specific environment variables:

  • PATH: /usr/sbin:/usr/local/bin:/usr/local/sbin:/Users/callen/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/opt/X11/bin
  • SHELL: /bin/bash
  • EDITOR: /usr/local/bin/mate -w
  • LANG: en_US.UTF-8
  • PWD: /Users/callen/testapp

Contents of Pipfile ('/Users/callen/testapp/Pipfile'):

[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]

[requires]
python_version = "2.7"
@duplicate-issues
Copy link

Hey @commandtab,

We did a quick check and this issue looks very darn similar to

This could be a coincidence, but if any of these issues solves your problem then I did a good job 😄

If not, the maintainers will get to this issue shortly.

Cheers,
Your Friendly Neighborhood ProBot

@jakul
Copy link

jakul commented Nov 16, 2018

I was able to work around this by specifying the path to the Python executable, i.e.

$ pipenv install --dev --python `which python3.6`

@jakul
Copy link

jakul commented Nov 16, 2018

Looks like this is fixed in pythonfinder v1.1.9, but Pipenv is currently vendoring 1.0.2

@techalchemy techalchemy added this to the November Bugfix Release milestone Nov 19, 2018
@techalchemy techalchemy added Type: Bug 🐛 This issue is a bug. Type: Regression This issue is a regression of a previous behavior. Type: Vendored Dependencies This issue affects vendored dependencies within pipenv. labels Nov 19, 2018
techalchemy added a commit that referenced this issue Nov 19, 2018
- Fixes #3242
- Fixes #3232
- Fixes #3229
- Fixes #3234

Signed-off-by: Dan Ryan <dan@danryan.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐛 This issue is a bug. Type: Regression This issue is a regression of a previous behavior. Type: Vendored Dependencies This issue affects vendored dependencies within pipenv.
Projects
None yet
Development

No branches or pull requests

3 participants