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.

pipenv update <pkg> updates all packages and not just the selected

See original GitHub issue
Issue description

When I have more than one outdated packages in Pipfile and run pipenv update package-name all outdated packages are updated.

Expected result

I only expect the selected package and its dependencies to be updated.

Actual result

$` pipenv update --outdated Package ‘jsonpickle’ out-of-date: ‘==0.9.5’ installed, ‘==0.9.6’ available. Package ‘requests’ out-of-date: ‘==2.19.0’ installed, ‘==2.19.1’ available.

$ pipenv update jsonpickle Locking [dev-packages] dependencies… Locking [packages] dependencies… Updated Pipfile.lock (15aa44)! Installing dependencies from Pipfile.lock (15aa44)… 🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 6/6 — 00:00:01 To activate this project’s virtualenv, run pipenv shell. Alternatively, run a command inside the virtualenv with pipenv run. All dependencies are now up-to-date!

$ pipenv update --outdated $

both jsonpickle and requests where updated

Steps to replicate

$ pipenv install jsonpickle==0.9.5 $ pipenv install requests==2.19.0

update Pipfile from: $ cat Pipfile [[source]] url = “https://pypi.org/simple” verify_ssl = true name = “pypi”

[packages] requests = “==2.19.0” jsonpickle = “==0.9.5”

[dev-packages]

[requires] python_version = “3.6”

to: $ cat Pipfile [[source]] url = “https://pypi.org/simple” verify_ssl = true name = “pypi”

[packages] requests = “" jsonpickle = "

[dev-packages]

[requires] python_version = “3.6”

update jsonpickle: $ pipenv update --outdated Package ‘jsonpickle’ out-of-date: ‘==0.9.5’ installed, ‘==0.9.6’ available. Package ‘requests’ out-of-date: ‘==2.19.0’ installed, ‘==2.19.1’ available. $ pipenv update jsonpickle Locking [dev-packages] dependencies… Locking [packages] dependencies… Updated Pipfile.lock (15aa44)! Installing dependencies from Pipfile.lock (15aa44)… 🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 6/6 — 00:00:01 To activate this project’s virtualenv, run pipenv shell. Alternatively, run a command inside the virtualenv with pipenv run. All dependencies are now up-to-date!

Both packages are updated.


$ pipenv --support

Pipenv version: '2018.7.1'

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

Python location: '/home/darwin/.pyenv/versions/3.6.4/bin/python3.6'

Other Python installations in PATH:

  • 2.7: /usr/bin/python2.7

  • 2.7: /usr/bin/python2.7

  • 3.5: /usr/bin/python3.5m

  • 3.5: /usr/bin/python3.5

  • 3.6: /home/darwin/.pyenv/versions/3.6.4/bin/python3.6m

  • 3.6: /home/darwin/.pyenv/versions/3.6.4/bin/python3.6

  • 3.6: /home/darwin/.pyenv/shims/python3.6

  • 3.6: /home/darwin/.pyenv/shims/python3.6

  • 3.6: /home/darwin/.pyenv/shims/python3.6

  • 3.6.4: /home/darwin/.pyenv/versions/3.6.4/bin/python

  • 3.6.4: /home/darwin/.pyenv/shims/python

  • 3.6.4: /home/darwin/.pyenv/shims/python

  • 3.6.4: /home/darwin/.pyenv/shims/python

  • 2.7.12: /usr/bin/python

  • 2.7.12: /usr/bin/python2

  • 3.6.4: /home/darwin/.pyenv/versions/3.6.4/bin/python3

  • 3.6.4: /home/darwin/.pyenv/shims/python3

  • 3.6.4: /home/darwin/.pyenv/shims/python3

  • 3.6.4: /home/darwin/.pyenv/shims/python3

  • 3.5.2: /usr/bin/python3

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.6.4',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '4.13.0-45-generic',
 'platform_system': 'Linux',
 'platform_version': '#50~16.04.1-Ubuntu SMP Wed May 30 11:18:27 UTC 2018',
 'python_full_version': '3.6.4',
 'python_version': '3.6',
 'sys_platform': 'linux'}

System environment variables:

  • LC_PAPER
  • XDG_VTNR
  • XDG_SESSION_ID
  • LC_ADDRESS
  • LC_MONETARY
  • CLUTTER_IM_MODULE
  • XDG_GREETER_DATA_DIR
  • SESSION
  • GPG_AGENT_INFO
  • PYENV_ROOT
  • VTE_VERSION
  • SHELL
  • TERM
  • XDG_MENU_PREFIX
  • PIPENV_VENV_IN_PROJECT
  • QT_LINUX_ACCESSIBILITY_ALWAYS_ON
  • WINDOWID
  • LC_NUMERIC
  • UPSTART_SESSION
  • GNOME_KEYRING_CONTROL
  • GTK_MODULES
  • PYENV_VERSION
  • USER
  • LS_COLORS
  • LC_TELEPHONE
  • QT_ACCESSIBILITY
  • XDG_SESSION_PATH
  • XDG_SEAT_PATH
  • SSH_AUTH_SOCK
  • PYENV_DIR
  • SESSION_MANAGER
  • DEFAULTS_PATH
  • TMUX
  • XDG_CONFIG_DIRS
  • PATH
  • DESKTOP_SESSION
  • QT_QPA_PLATFORMTHEME
  • QT_IM_MODULE
  • EVENT_NOEPOLL
  • LC_IDENTIFICATION
  • XDG_SESSION_TYPE
  • JOB
  • PWD
  • XMODIFIERS
  • GNOME_KEYRING_PID
  • LANG
  • GDM_LANG
  • MANDATORY_PATH
  • LC_MEASUREMENT
  • PYENV_HOOK_PATH
  • IM_CONFIG_PHASE
  • COMPIZ_CONFIG_PROFILE
  • TMUX_PANE
  • GDMSESSION
  • SESSIONTYPE
  • GTK2_MODULES
  • PYENV_SHELL
  • HOME
  • SHLVL
  • XDG_SEAT
  • LANGUAGE
  • GNOME_DESKTOP_SESSION_ID
  • XDG_SESSION_DESKTOP
  • LOGNAME
  • DBUS_SESSION_BUS_ADDRESS
  • QT4_IM_MODULE
  • XDG_DATA_DIRS
  • LESSOPEN
  • INSTANCE
  • DISPLAY
  • XDG_RUNTIME_DIR
  • GTK_IM_MODULE
  • XDG_CURRENT_DESKTOP
  • LC_TIME
  • LESSCLOSE
  • XAUTHORITY
  • LC_NAME
  • PYTHONDONTWRITEBYTECODE
  • PIP_PYTHON_PATH

Pipenv–specific environment variables:

  • PIPENV_VENV_IN_PROJECT: 1

Debug–specific environment variables:

  • PATH: /home/darwin/.pyenv/versions/3.6.4/bin:/home/darwin/.pyenv/libexec:/home/darwin/.pyenv/plugins/python-build/bin:/home/darwin/.pyenv/plugins/pyenv-virtualenv/bin:/home/darwin/.pyenv/plugins/py env-update/bin:/home/darwin/.pyenv/plugins/pyenv-installer/bin:/home/darwin/.pyenv/plugins/pyenv-doctor/bin:/home/darwin/.pyenv/shims:/home/darwin/.pyenv/bin:/home/darwin/.pyenv/shims:/home/darwin/.pyenv/ bin:/home/darwin/.pyenv/shims:/home/darwin/.pyenv/bin:/home/darwin/bin:/home/darwin/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
  • SHELL: /bin/bash
  • LANG: en_US.UTF-8
  • PWD: /home/darwin/pipenv_test

Contents of Pipfile (‘/home/darwin/pipenv_test/Pipfile’):

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

[packages]
requests = "*"
jsonpickle = "*"

[dev-packages]

[requires]
python_version = "3.6"

Contents of Pipfile.lock (‘/home/darwin/pipenv_test/Pipfile.lock’):

{
    "_meta": {
        "hash": {
            "sha256": "0566daf64852964905816f083f9b740b46ca8bd820ca2e6886988c239b15aa44"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.6"
        },
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {
        "certifi": {
            "hashes": [
                "sha256:13e698f54293db9f89122b0581843a782ad0934a4fe0172d2a980ba77fc61bb7",
                "sha256:9fa520c1bacfb634fa7af20a76bcbd3d5fb390481724c597da32c719a7dca4b0"
            ],
            "version": "==2018.4.16"
        },
        "chardet": {
            "hashes": [
                "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae",
                "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"
            ],
            "version": "==3.0.4"
        },
        "idna": {
            "hashes": [
                "sha256:156a6814fb5ac1fc6850fb002e0852d56c0c8d2531923a51032d1b70760e186e",
                "sha256:684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16"
            ],
            "version": "==2.7"
        },
        "jsonpickle": {
            "hashes": [
                "sha256:545b3bee0d65e1abb4baa1818edcc9ec239aa9f2ffbfde8084d71c056180054f"
            ],
            "index": "pypi",
            "version": "==0.9.6"
        },
        "requests": {
            "hashes": [
                "sha256:63b52e3c866428a224f97cab011de738c36aec0185aa91cfacd418b5d58911d1",
                "sha256:ec22d826a36ed72a7358ff3fe56cbd4ba69dd7a6718ffd450ff0e9df7a47ce6a"
            ],
            "index": "pypi",
            "version": "==2.19.1"
        },
        "urllib3": {
            "hashes": [
                "sha256:a68ac5e15e76e7e5dd2b8f94007233e01effe3e50e8daddf69acfd81cb686baf",
                "sha256:b5725a0bd4ba422ab0e66e89e030c806576753ea3ee08554382c14e685d117b5"
            ],
            "markers": "python_version >= '2.6' and python_version != '3.3.*' and python_version != '3.0.*' and python_version != '3.2.*' and python_version != '3.1.*' and python_version < '4'",
            "version": "==1.23"
        }
    },
    "develop": {}
}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

24reactions
gegenschallcommented, Oct 23, 2018

I’m not really sure why this is closed as the issue still isn’t fixed with either this issue or #2412. With the most recent version of pipenv I have no way of selectively upgrading packages. I can either update them all at once or none at all. 😕

Another thing: Running pipenv update --keep-outdated python-package results in the message “All dependencies are now up-to-date!” when in reality nothing has been done at all.

edit: removed outbursty language.

16reactions
fredrikaverpilcommented, May 28, 2019

Just got hit by this. What is the recommended way to update one single package to its latest version?

Even pipenv update --selective-upgrade pipenv updates all my packages. I am on Windows 10 with pipenv 2018.11.26.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to install / update package with pipenv without ...
Running pipenv install/uninstall/update with --keep-outdated will prevent pipenv from updating unrelated locked packages.
Read more >
Basic Usage of Pipenv - Read the Docs
Want to upgrade everything? Just do $ pipenv update . Want to upgrade packages one-at-a-time? $ pipenv update <pkg> for each outdated package....
Read more >
How to Update All Python Packages
Update all Python Packages on Windows · Open a command shell by typing 'powershell' in the Search Box of the Task bar ·...
Read more >
Basic Usage of Pipenv
lock for now, run pipenv lock --keep-outdated . Make sure to upgrade soon! ☤ Specifying Versions of a Package¶. To tell pipenv to...
Read more >
Install, uninstall, and upgrade Python packages
This option is not available for Conda environments. Select the target package and click Install Package. warning. If ...
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