question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Regression in 2020.11.15 failing to install dependencies defined in setup.py

See original GitHub issue

Be sure to check the existing issues (both open and closed!), and make sure you are running the latest version of Pipenv.

Check the diagnose documentation for common issues before posting! We may close your issue if it is very similar to one of them. Please be considerate, or be on your way.

Make sure to mention your debugging experience if the documented solution failed.

Issue description

I was investigating this issue: https://github.com/pypa/pipenv/issues/4355 and noticed that my project that contains all the dependencies in setup.py and has the Pipfile simply install “.” in editable mode is no longer installing anything defined in install_requires in my setup.py. However, this behavior is not present in 2020.11.4.

My setup.py file is defining "install_requires": ["numpy"], and my Pipfile looks like this:

[packages]
my-thing = {path = ".",editable = true}

Expected result

I expect the lock file to contain numpy and numpy to be isntalled.

Actual result

My package is installed but numpy is missing. No errors visible in any of the verbose output.

Steps to replicate

Provide the steps to replicate (which usually at least includes the commands and the Pipfile).


$ pipenv --support

Pipenv version: '2020.11.15'

Pipenv location: '/home/myuser/.pyenv/versions/3.6.8/lib/python3.6/site-packages/pipenv'

Python location: '/home/myuser/.pyenv/versions/3.6.8/bin/python3.6'

Python installations found:

  • 3.8.5: /usr/bin/python3
  • 3.8.5: /usr/bin/python3.8
  • 3.8.5: /bin/python3
  • 3.8.5: /bin/python3.8
  • 3.7.5: /home/myuser/.pyenv/versions/3.7.5/bin/python3.7m
  • 3.7.4: /home/myuser/.pyenv/versions/3.7.4/bin/python3.7m
  • 3.6.8: /home/myuser/.local/share/virtualenvs/my-thing-sO64gR_A/bin/python3
  • 3.6.8: /home/myuser/.local/share/virtualenvs/my-thing-sO64gR_A/bin/python3.6
  • 3.6.8: /home/myuser/.local/share/virtualenvs/my-thing-sO64gR_A/bin/python3.6m
  • 3.6.8: /home/myuser/.pyenv/versions/3.6.8/bin/python3.6m
  • 3.6.8: /home/myuser/.pyenv/versions/3.6.8/bin/python3.6
  • 3.6.8: /home/myuser/.pyenv/versions/3.6.8/bin/python3
  • 3.6.8: /home/myuser/.local/share/virtualenvs/my-thing-sO64gR_A/bin/python3
  • 3.6.8: /home/myuser/.local/share/virtualenvs/my-thing-sO64gR_A/bin/python3.6
  • 3.6.8: /home/myuser/.local/share/virtualenvs/my-thing-sO64gR_A/bin/python3.6m
  • 3.6.8: /home/myuser/.pyenv/versions/3.6.8/bin/python3.6m
  • 2.7.18: /usr/bin/python2
  • 2.7.18: /usr/bin/python2.7
  • 2.7.18: /bin/python2
  • 2.7.18: /bin/python2.7

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.6.8',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '5.4.0-52-generic',
 'platform_system': 'Linux',
 'platform_version': '#57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020',
 'python_full_version': '3.6.8',
 'python_version': '3.6',
 'sys_platform': 'linux'}

System environment variables:

  • SHELL
  • LSCOLORS
  • SESSION_MANAGER
  • PYENV_HOOK_PATH
  • QT_ACCESSIBILITY
  • COLORTERM
  • PYENV_SHELL
  • XDG_CONFIG_DIRS
  • LESS
  • XDG_MENU_PREFIX
  • GNOME_DESKTOP_SESSION_ID
  • PIPENV_ACTIVE
  • TERMINATOR_DBUS_PATH
  • GNOME_SHELL_SESSION_MODE
  • SSH_AUTH_SOCK
  • DIRENV_DIR
  • TERMINATOR_UUID
  • XMODIFIERS
  • DESKTOP_SESSION
  • SSH_AGENT_PID
  • DEVOPS_PYPI_PW
  • PYENV_VERSION
  • GTK_MODULES
  • PWD
  • LOGNAME
  • XDG_SESSION_DESKTOP
  • XDG_SESSION_TYPE
  • GPG_AGENT_INFO
  • XAUTHORITY
  • GJS_DEBUG_TOPICS
  • WINDOWPATH
  • HOME
  • USERNAME
  • IM_CONFIG_PHASE
  • LANG
  • DEVOPS_BUILDS_PW
  • LS_COLORS
  • XDG_CURRENT_DESKTOP
  • VIRTUAL_ENV
  • VTE_VERSION
  • INVOCATION_ID
  • TERMINATOR_DBUS_NAME
  • MANAGERPID
  • DIRENV_DIFF
  • PYENV_DIR
  • GJS_DEBUG_OUTPUT
  • XDG_SESSION_CLASS
  • TERM
  • ZSH
  • USER
  • PIP_DISABLE_PIP_VERSION_CHECK
  • DISPLAY
  • APP_NAME
  • SHLVL
  • PAGER
  • QT_IM_MODULE
  • PYTHONDONTWRITEBYTECODE
  • KUBECONFIG
  • XDG_RUNTIME_DIR
  • PYENV_ROOT
  • DEVOPS_PYPI_URL
  • JOURNAL_STREAM
  • XDG_DATA_DIRS
  • PATH
  • GDMSESSION
  • DBUS_SESSION_BUS_ADDRESS
  • DIRENV_WATCHES
  • DEVOPS_PYPI_UN
  • GIO_LAUNCHED_DESKTOP_FILE_PID
  • GIO_LAUNCHED_DESKTOP_FILE
  • OLDPWD
  • PIP_SHIMS_BASE_MODULE
  • PIP_PYTHON_PATH
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

  • PIPENV_ACTIVE: 1

Debug–specific environment variables:

  • PATH: /home/myuser/.pyenv/versions/3.6.8/bin:/home/myuser/.pyenv/libexec:/home/myuser/.pyenv/plugins/python-build/bin:/home/myuser/.pyenv/plugins/pyenv-virtualenv/bin:/home/myuser/.pyenv/plugins/pyenv-update/bin:/home/myuser/.pyenv/plugins/pyenv-installer/bin:/home/myuser/.pyenv/plugins/pyenv-doctor/bin:/home/myuser/projects/things/thing/my-thing/bin:/home/myuser/.local/share/virtualenvs/my-thing-sO64gR_A/bin:/home/myuser/.pyenv/shims:/home/myuser/.pyenv/bin:/home/myuser/.local/bin:/home/myuser/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
  • SHELL: /usr/bin/zsh
  • LANG: en_US.UTF-8
  • PWD: /home/myuser/projects/things/thing/my-thing
  • VIRTUAL_ENV: /home/myuser/.local/share/virtualenvs/my-thing-sO64gR_A

Contents of Pipfile (‘/home/myuser/projects/things/thing/my-thing/Pipfile’):

[[source]]
name = "artifacts"
url = "$DEVOPS_PYPI_URL"
verify_ssl = true

[dev-packages]

[packages]
my-thing = {path = ".",editable = true}

[requires]
python_version = "3.6.8"

Contents of Pipfile.lock (‘/home/myuser/projects/things/thing/my-thing/Pipfile.lock’):

{
    "_meta": {
        "hash": {
            "sha256": "2e965c720ff5205f879ac66e310611ee278a76f98b98369f07f25eba3620b70b"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.6.8"
        },
        "sources": [
            {
                "name": "artifacts",
                "url": "$DEVOPS_PYPI_URL",
                "verify_ssl": true
            }
        ]
    },
    "default": {
        "my-thing": {
            "editable": true,
            "path": "."
        },
        "install-requires": {
            "hashes": [
                "sha256:d6229486e085a330041d3cc6f47eeb8d2fd0c255cf81a4b899b287c306deb717"
            ],
            "version": "==0.3.0"
        }
    },
    "develop": {}
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
frostmingcommented, Nov 25, 2020

Pipenv uses a “resolve then override” method when there are editable requirements with the same name as the released one. So the release version must exist in the first place to make the resolution work.

1reaction
frostmingcommented, Nov 23, 2020

@ms-lolo Thanks for that. I think you have already figured out the workaround. Either of the following solutions will do the trick:

  1. Use setup(install_requires=install_requires) directly instead of via a dict.
  2. Define requirements literally in install_requires field.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Why doesn't pip install dependencies specified in setup.py?
Yeah, I created a new environment to test the install process; the install fails due to uninstalled dependencies :( – alliedtoasters. Jun 3, ......
Read more >
pipenv Changelog - pyup.io
- Pipenv can now install relative file paths. - Better messaging around failed installs. - More resilient network io when retrieving data from...
Read more >
What Are Python Wheels and Why Should You Care?
Wheels make the end-to-end installation of Python packages faster for two reasons: All else being equal, wheels are typically smaller in size than...
Read more >
setuptools 3.7.1 - PyPI
Easily download, build, install, upgrade, and uninstall Python packages.
Read more >
wheel Documentation - Read the Docs
A setuptools extension for building wheels that provides the ... If you prefer using your system package manager to install Python packages, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found