Skip to content

pip9/baseparser.py line 149 in __init__ assert self.name AssertionError #2210

@bofm

Description

@bofm
$ python -m pipenv.help output

Pipenv version: '2018.05.18'

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

Python location: '/usr/local/bin/python'

Other Python installations in PATH:

  • 2.7: /usr/bin/python2.7

  • 2.7: /usr/bin/python2.7

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

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

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

  • 3.6.5: /usr/local/bin/python

  • 3.6.5: /usr/local/bin/python

  • 2.7.9: /usr/bin/python

  • 2.7.9: /usr/bin/python2

  • 3.6.5: /usr/local/bin/python3

  • 3.6.5: /usr/local/bin/python3

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.6.5',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '4.9.87-linuxkit-aufs',
 'platform_system': 'Linux',
 'platform_version': '#1 SMP Wed Mar 14 15:12:16 UTC 2018',
 'python_full_version': '3.6.5',
 'python_version': '3.6',
 'sys_platform': 'linux'}

System environment variables:

  • HOSTNAME
  • GPG_KEY
  • TERM
  • PYTHON_VERSION
  • PATH
  • PWD
  • LANG
  • PYTHON_PIP_VERSION
  • SHLVL
  • HOME
  • _
  • OLDPWD
  • PYTHONDONTWRITEBYTECODE
  • PIP_PYTHON_PATH

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  • LANG: C.UTF-8
  • PWD: /

Contents of Pipfile ('/Pipfile'):

------------
Problem

pipenv install requests fails

Expected result

requests is installed
OR
a clear error message is shown

Actual result

When possible, provide the verbose output (--verbose), especially for locking and dependencies resolving issues.

Steps to replicate

Using python:3.6.5 official Docker image

# docker run --rm -it python:3.6.5 bash
root@17a3028b47ef:/# pip install pipenv
Collecting pipenv
  Downloading https://files.pythonhosted.org/packages/8d/fe/4faa519acfb984015dde4e2973d89e47baf6a9cd81e9d58e2f2d3c47fb6f/pipenv-2018.5.18-py3-none-any.whl (6.4MB)
    100% |████████████████████████████████| 6.4MB 6.9MB/s
Collecting certifi (from pipenv)
  Downloading https://files.pythonhosted.org/packages/7c/e6/92ad559b7192d846975fc916b65f667c7b8c3a32bea7372340bfe9a15fa5/certifi-2018.4.16-py2.py3-none-any.whl (150kB)
    100% |████████████████████████████████| 153kB 21.8MB/s
Requirement already satisfied: setuptools>=36.2.1 in /usr/local/lib/python3.6/site-packages (from pipenv) (39.1.0)
Collecting virtualenv (from pipenv)
  Downloading https://files.pythonhosted.org/packages/b6/30/96a02b2287098b23b875bc8c2f58071c35d2efe84f747b64d523721dc2b5/virtualenv-16.0.0-py2.py3-none-any.whl (1.9MB)
    100% |████████████████████████████████| 1.9MB 16.9MB/s
Requirement already satisfied: pip>=9.0.1 in /usr/local/lib/python3.6/site-packages (from pipenv) (10.0.1)
Collecting virtualenv-clone>=0.2.5 (from pipenv)
  Downloading https://files.pythonhosted.org/packages/6d/c2/dccb5ccf599e0c5d1eea6acbd058af7a71384f9740179db67a9182a24798/virtualenv_clone-0.3.0-py2.py3-none-any.whl
Installing collected packages: certifi, virtualenv, virtualenv-clone, pipenv
Successfully installed certifi-2018.4.16 pipenv-2018.5.18 virtualenv-16.0.0 virtualenv-clone-0.3.0


root@17a3028b47ef:/# pipenv install requests  --verbose
Creating a virtualenv for this project…
Using /usr/local/bin/python (3.6.5) to create virtualenv…
⠋usage: __main__.py [-h] [-p PYTHON] [-i PACKAGES] [-r REQUIREMENTS] [-d]
                   [-a PROJECT]
                   envname
__main__.py: error: the following arguments are required: envname

Virtualenv location:
Creating a Pipfile for this project…
Traceback (most recent call last):
  File "/usr/local/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/pipenv/cli.py", line 402, in install
    selective_upgrade=selective_upgrade,
  File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 1781, in do_install
    skip_requirements=skip_requirements,
  File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 650, in ensure_project
    ensure_pipfile(validate=validate, skip_requirements=skip_requirements, system=system)
  File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 304, in ensure_pipfile
    project.create_pipfile(python=python)
  File "/usr/local/lib/python3.6/site-packages/pipenv/project.py", line 571, in create_pipfile
    config_parser = ConfigOptionParser(name=self.name)
  File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/pip9/baseparser.py", line 149, in __init__
    assert self.name
AssertionError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions