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 uninstall leaves entry in Pipfile [packages]

See original GitHub issue

tl;dr pipenv uninstall setuptools does not remove the entry from Pipfile section [packages].

Steps to replicate

  1. create a new project and install a virtual environment
$ mkdir proj1

$ cd proj1

$ pipenv --python 3.7
Creating a virtualenv for this project…
…
Successfully created virtual environment!
Virtualenv location: C:\Users\ulug\.virtualenvs\temp1-wqpe6Y-N
Creating a Pipfile for this project…

$ pipenv install setuptools
…

The generated Pipfile has contents

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

[dev-packages]

[packages]
setuptools = "*"

[requires]
python_version = "3.7"

Uninstall setuptools

$ pipenv uninstall setuptools

UNEXPECTED: Pipfile still has entry setuptools = "*" in section [packages] (the Pipfile has not changed). EXPECTED: pipenv would remove entry setuptools = "*" in section [packages]. The --help output reads

$ pipenv --help
…
 uninstall  Un-installs a provided package and removes it from Pipfile.
…

$ pipenv --support

Pipenv version: '2018.11.26'

Pipenv location: 'c:\\python\\python37\\lib\\site-packages\\pipenv'

Python location: 'c:\\python\\python37\\python.exe'

Python installations found:

  • 3.7.1: C:\Python\Python37\python.exe
  • 3.6.7: C:\Python\Python36\python.exe
  • 3.5: C:\Python\Python35\python.exe
  • 3.4: C:\Python\Python34\python.exe

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.7.1',
 'os_name': 'nt',
 'platform_machine': 'AMD64',
 'platform_python_implementation': 'CPython',
 'platform_release': '10',
 'platform_system': 'Windows',
 'python_full_version': '3.7.1',
 'python_version': '3.7',
 'sys_platform': 'win32'}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
tombohubcommented, Dec 11, 2020

happens with every package if you put version also pipenv uninstall django==3.1.0

so you can install with version, but you cannot uninstall with version…

0reactions
zvolskycommented, Jul 27, 2020

also happens … always?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to autoremove dependent Python packages within a ...
This shows that the dependent packages are still installed, but these have already been removed form Pipfile.lock. Therefore, using pipenv clean ...
Read more >
pipenv Documentation - Read the Docs
--all-dev — This parameter will remove all of the development packages from the virtual environment, and remove them from the Pipfile. $ pipenv...
Read more >
Advanced Usage of Pipenv - Python Packaging Authority
Pipenv will expand environment variables (if defined) in your Pipfile. ... expanded in runtime, leaving the entries in Pipfile or Pipfile.lock untouched.
Read more >
pipenv Changelog - PyUp.io
Remove iso8601 from vendored packages since it was not used. ... because not everyone specifies editable entry in the Pipfile for local editable...
Read more >
The ABCs of Pipenv and Python Package Management
An entry-level look at how to setup determinstic Python environments using Pipenv.
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