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

pipenv fails to crate virtual enviroment #3143

Closed
matthewric opened this issue Nov 2, 2018 · 5 comments
Closed

pipenv fails to crate virtual enviroment #3143

matthewric opened this issue Nov 2, 2018 · 5 comments
Labels
Status: Awaiting Update ⏳ This issue requires more information before assistance can be provided. Status: Needs More Information This issue does not provide enough information to take further action.

Comments

@matthewric
Copy link

Issue description

on running pipenv install and pipenv --python 3.7 it fails with the following

Expected result

I expected it to work

Actual result

root@wookie:/py# pipenv install
Creating a Pipfile for this project…
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 11, in
sys.exit(cli())
File "/usr/local/lib/python3.7/dist-packages/pipenv/vendor/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/pipenv/vendor/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/dist-packages/pipenv/vendor/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/dist-packages/pipenv/vendor/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/dist-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/pipenv/vendor/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/pipenv/cli/command.py", line 249, in install
editable_packages=state.installstate.editables,
File "/usr/local/lib/python3.7/dist-packages/pipenv/core.py", line 1724, in do_install
pypi_mirror=pypi_mirror,
File "/usr/local/lib/python3.7/dist-packages/pipenv/core.py", line 601, in ensure_project
validate=validate, skip_requirements=skip_requirements, system=system
File "/usr/local/lib/python3.7/dist-packages/pipenv/core.py", line 324, in ensure_pipfile
project.create_pipfile(python=python)
File "/usr/local/lib/python3.7/dist-packages/pipenv/project.py", line 644, in create_pipfile
config_parser = ConfigOptionParser(name=self.name)
File "/usr/local/lib/python3.7/dist-packages/pipenv/patched/notpip/_internal/baseparser.py", line 141, in init
assert self.name
AssertionError


pipenv --support output

$ pipenv --support

Pipenv version: '2018.10.13'

Pipenv location: '/usr/local/lib/python3.7/dist-packages/pipenv'

Python location: '/usr/bin/python'

Python installations found:

  • 3.7.1: /usr/bin/python3.7
  • 3.7.1: /usr/bin/python3.7m
  • 3.7.1: /usr/bin/python
  • 3.7.0: /usr/local/bin/python3.7
  • 3.7.0: /usr/local/bin/python3.7m
  • 3.5.2: /usr/bin/python3.5m
  • 3.5.2: /usr/bin/python3.5
  • 2.7.12: /usr/bin/python2.7
  • 2.7.0: /usr/local/lib/jython/bin/jython

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.7.1',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '2.6.32-042stab133.2',
'platform_system': 'Linux',
 'platform_version': '#1 SMP Mon Aug 27 21:07:08 MSK 2018',
 'python_full_version': '3.7.1',
 'python_version': '3.7',
 'sys_platform': 'linux'}

System environment variables:

  • XDG_SESSION_ID
  • SHELL
  • TERM
  • SSH_CLIENT
  • OLDPWD
  • SSH_TTY
  • GTK_MODULES
  • LC_ALL
  • USER
  • LS_COLORS
  • PYENV_VIRTUALENV_INIT
  • PATH
  • MAIL
  • PWD
  • LANG
  • PYENV_SHELL
  • HOME
  • SHLVL
  • LOGNAME
  • SSH_CONNECTION
  • LESSOPEN
  • DISPLAY
  • XDG_RUNTIME_DIR
  • LESSCLOSE
  • _
  • PYTHONDONTWRITEBYTECODE
  • PIP_SHIMS_BASE_MODULE
  • PIP_PYTHON_PATH

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /root/.pyenv/plugins/pyenv-virtualenv/shims:/root/.pyenv/shims:~/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
  • SHELL: /bin/bash
  • LANG: C.UTF-8
  • PWD: /py

Contents of Pipfile ('/Pipfile'):

@techalchemy
Copy link
Member

Please try using the master branch or provide us with step by step instructions for reproducing the failure you are experiencing.

I would point out that it is not recommended to run pipenv or any python packaging tools as root.

@techalchemy techalchemy added Status: Needs More Information This issue does not provide enough information to take further action. Status: Awaiting Update ⏳ This issue requires more information before assistance can be provided. labels Nov 2, 2018
@XakV
Copy link

XakV commented Nov 5, 2018

Looks similar to an issue I am having on Fedora 29.

`pipenv install requests
Creating a virtualenv for this project...
Pipfile: /home/zach/Code/Sites/testish/Pipfile
Using /usr/bin/python3 (3.7.1) to create virtualenv...
⠋/usr/bin/python3: No module named pipenv.pew

Virtualenv location:
Creating a Pipfile for this project...
Traceback (most recent call last):
File "/usr/bin/pipenv", line 11, in
load_entry_point('pipenv==2018.7.1', 'console_scripts', 'pipenv')()
File "/usr/lib/python3.7/site-packages/click/core.py", line 721, in call
return self.main(*args, **kwargs)
File "/usr/lib/python3.7/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.7/site-packages/click/core.py", line 1065, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3.7/site-packages/click/core.py", line 894, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3.7/site-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python3.7/site-packages/pipenv/cli.py", line 435, in install
selective_upgrade=selective_upgrade,
File "/usr/lib/python3.7/site-packages/pipenv/core.py", line 1759, in do_install
pypi_mirror=pypi_mirror,
File "/usr/lib/python3.7/site-packages/pipenv/core.py", line 639, in ensure_project
ensure_pipfile(validate=validate, skip_requirements=skip_requirements, system=system)
File "/usr/lib/python3.7/site-packages/pipenv/core.py", line 288, in ensure_pipfile
project.create_pipfile(python=python)
File "/usr/lib/python3.7/site-packages/pipenv/project.py", line 607, in create_pipfile
required_python = self.which('python')
File "/usr/lib/python3.7/site-packages/pipenv/core.py", line 115, in which
p = os.path.join(location, 'bin', command)
File "/usr/lib64/python3.7/posixpath.py", line 80, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Things I've tried; pip install --upgrade pipenv --user
`
Steps to reproduce;

  • Create new directory with mkdir
  • Create pipenv with;

pipenv --three

  • Fails with error message;

`pipenv --three
Creating a virtualenv for this project...
Pipfile: /home/zach/Code/Sites/test2/Pipfile
Using /usr/bin/python3 (3.7.1) to create virtualenv...
⠋/usr/bin/python3: No module named pipenv.pew

Virtualenv location:
Traceback (most recent call last):
File "/usr/bin/pipenv", line 11, in
load_entry_point('pipenv==2018.7.1', 'console_scripts', 'pipenv')()
File "/usr/lib/python3.7/site-packages/click/core.py", line 721, in call
return self.main(*args, **kwargs)
File "/usr/lib/python3.7/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.7/site-packages/click/core.py", line 1042, in invoke
return Command.invoke(self, ctx)
File "/usr/lib/python3.7/site-packages/click/core.py", line 894, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3.7/site-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/lib/python3.7/site-packages/pipenv/cli.py", line 294, in cli
three=three, python=python, warn=True, site_packages=site_packages, pypi_mirror=pypi_mirror
File "/usr/lib/python3.7/site-packages/pipenv/core.py", line 639, in ensure_project
ensure_pipfile(validate=validate, skip_requirements=skip_requirements, system=system)
File "/usr/lib/python3.7/site-packages/pipenv/core.py", line 244, in ensure_pipfile
python = which('python') if not (USING_DEFAULT_PYTHON or system) else None
File "/usr/lib/python3.7/site-packages/pipenv/core.py", line 115, in which
p = os.path.join(location, 'bin', command)
File "/usr/lib64/python3.7/posixpath.py", line 80, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType`

Output of pipenv --support

`

$ pipenv --support

Pipenv version: '2018.7.1'

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

Python location: '/usr/bin/python3'

Other Python installations in PATH:

  • 2.7: /usr/bin/python2.7

  • 2.7: /usr/bin/python2.7

  • 3.6: /usr/bin/python3.6m

  • 3.6: /usr/bin/python3.6

  • 3.7: /usr/bin/python3.7m

  • 3.7: /usr/bin/python3.7

  • 2.7.15: /usr/bin/python

  • 2.7.15: /usr/bin/python2

  • 3.7.1: /usr/bin/python3

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.7.1',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '4.18.16-300.fc29.x86_64',
 'platform_system': 'Linux',
 'platform_version': '#1 SMP Sat Oct 20 23:24:08 UTC 2018',
 'python_full_version': '3.7.1',
 'python_version': '3.7',
 'sys_platform': 'linux'}

System environment variables:

  • LS_COLORS
  • XDG_MENU_PREFIX
  • MODULES_RUN_QUARANTINE
  • LANG
  • GDM_LANG
  • HISTCONTROL
  • MANAGERPID
  • DISPLAY
  • GUESTFISH_RESTORE
  • HOSTNAME
  • OLDPWD
  • INVOCATION_ID
  • COLORTERM
  • GUESTFISH_INIT
  • USERNAME
  • LUA_PATH
  • XDG_VTNR
  • SSH_AUTH_SOCK
  • S_COLORS
  • XDG_SESSION_ID
  • MODULES_CMD
  • USER
  • ENV
  • GUESTFISH_PS1
  • DESKTOP_SESSION
  • LUA_CPATH
  • PWD
  • HOME
  • JOURNAL_STREAM
  • SSH_AGENT_PID
  • XDG_SESSION_TYPE
  • BASH_ENV
  • XDG_DATA_DIRS
  • XDG_SESSION_DESKTOP
  • TILIX_ID
  • DBUS_STARTER_ADDRESS
  • LOADEDMODULES
  • MAIL
  • WINDOWPATH
  • SHELL
  • VTE_VERSION
  • TERM
  • QT_IM_MODULE
  • XMODIFIERS
  • DBUS_STARTER_BUS_TYPE
  • XDG_CURRENT_DESKTOP
  • SHLVL
  • XDG_SEAT
  • MODULEPATH
  • GDMSESSION
  • LOGNAME
  • DBUS_SESSION_BUS_ADDRESS
  • XDG_RUNTIME_DIR
  • XAUTHORITY
  • MODULEPATH_modshare
  • PATH
  • GUESTFISH_OUTPUT
  • MODULESHOME
  • HISTSIZE
  • SESSION_MANAGER
  • LESSOPEN
  • BASH_FUNC_module%%
  • BASH_FUNC__module_raw%%
  • BASH_FUNC_switchml%%
  • BASH_FUNC_scl%%
  • _
  • PYTHONDONTWRITEBYTECODE
  • PIP_PYTHON_PATH

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /home/zach/.luarocks/bin:/usr/local/bin:/usr/share/Modules/bin:/usr/lib64/ccache:/usr/local/sbin:/usr/bin:/usr/sbin:/home/zach/.local/bin:/home/zach/.local/bin/exercism:/home/zach/bin
  • SHELL: /bin/bash
  • LANG: en_US.UTF-8
  • PWD: /home/zach/Code/Sites/test2

Contents of Pipfile ('/home/zach/Code/Sites/test2/Pipfile'):

`

@techalchemy
Copy link
Member

Sorry you are encountering this issue, but please upgrade as I can't really offer you any solutions that won't involve upgrading

@XakV
Copy link

XakV commented Nov 6, 2018

Ok - well, I don't know what or how I did it, but I ended up using the curl | python method of upgrading and things seem to be working now. I really thought I had upgraded pip and pipenv fully, but apparently had messed up something along the way. It would be good if pipenv were more aware of what the user has done and could give me a warning if I needed to update. I think it might already do this, but ??? idk..I guess I out-human-ed the pip for humans? Thanks for helping.

@frostming
Copy link
Contributor

Close this one now. Thanks for the updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting Update ⏳ This issue requires more information before assistance can be provided. Status: Needs More Information This issue does not provide enough information to take further action.
Projects
None yet
Development

No branches or pull requests

4 participants