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.
pipenv uninstall --all-dev does not work.
It tells me ModuleNotFoundError: No module named 'pipenv.vendor.packaging'
pipenv uninstall --all-dev works as expected
Describe what you expected.
When possible, provide the verbose output (--verbose), especially for locking and dependencies resolving issues.
Provide the steps to replicate (which usually at least includes the commands and the Pipfile).
Please follow these steps to reproduce:
it should not give an error.
[kus@asus-vivobook scripts]$ cd ~/src/personal/
[kus@asus-vivobook personal]$ mkdir -p myrequest
[kus@asus-vivobook personal]$ cd myrequest/
[kus@asus-vivobook myrequest]$ ls -a
. ..
[kus@asus-vivobook myrequest]$ pipenv install
Creating a virtualenv for this project…
Pipfile: /home/kus/src/personal/myrequest/Pipfile
Using /usr/bin/python3 (3.7.2) to create virtualenv…
⠼ Creating virtual environment...Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/kus/.local/share/virtualenvs/myrequest-fayK9fOV/bin/python3
Also creating executable in /home/kus/.local/share/virtualenvs/myrequest-fayK9fOV/bin/python
Installing setuptools, pip, wheel...done.
✔ Successfully created virtual environment!
Virtualenv location: /home/kus/.local/share/virtualenvs/myrequest-fayK9fOV
Creating a Pipfile for this project…
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (a65489)!
Installing dependencies from Pipfile.lock (a65489)…
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
[kus@asus-vivobook myrequest]$ pipenv uninstall --all-dev
Traceback (most recent call last):
File "/usr/bin/pipenv", line 11, in
load_entry_point('pipenv==2018.11.26', 'console_scripts', 'pipenv')()
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 764, in __call__
return self.main(args, *kwargs)
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, *ctx.params)
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(args, *kwargs)
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, *kwargs)
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(args, *kwargs)
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
return f(get_current_context(), args, *kwargs)
File "/usr/lib/python3.7/site-packages/pipenv/cli/command.py", line 301, in uninstall
ctx=ctx
File "/usr/lib/python3.7/site-packages/pipenv/core.py", line 2012, in do_uninstall
from .vendor.packaging.utils import canonicalize_name
ModuleNotFoundError: No module named 'pipenv.vendor.packaging'
Please run $ pipenv --support, and paste the results here. Don't put backticks (`) around it! The output already contains Markdown formatting.
If you're on macOS, run the following:
$ pipenv --support | pbcopy
If you're on Windows, run the following:
> pipenv --support | clip
If you're on Linux, run the following:
$ pipenv --support | xclip
$ pipenv --support
$ pipenv --support
Pipenv version: '2018.11.26'
Pipenv location: '/usr/lib/python3.7/site-packages/pipenv'
Python location: '/usr/bin/python3'
Python installations found:
3.7.2: /usr/bin/python3.7m3.7.2: /usr/bin/python32.7.15: /usr/bin/pythonPEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.7.2',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '4.19.15-300.fc29.x86_64',
'platform_system': 'Linux',
'platform_version': '#1 SMP Mon Jan 14 16:32:35 UTC 2019',
'python_full_version': '3.7.2',
'python_version': '3.7',
'sys_platform': 'linux'}
System environment variables:
NVM_DIRLS_COLORSXDG_MENU_PREFIXMODULES_RUN_QUARANTINELANGGDM_LANGHISTCONTROLDISPLAYHOSTNAMEOLDPWDCOLORTERMNVM_CD_FLAGSUSERNAMEXDG_VTNRSSH_AUTH_SOCKXDG_SESSION_IDMODULES_CMDUSERENVDESKTOP_SESSIONGNOME_TERMINAL_SCREENPWDHOMESSH_AGENT_PIDXDG_SESSION_TYPEBASH_ENVXDG_DATA_DIRSXDG_SESSION_DESKTOPGJS_DEBUG_OUTPUTLOADEDMODULESMAILWINDOWPATHTERMSHELLVTE_VERSIONQT_IM_MODULEXMODIFIERSNVM_BINXDG_CURRENT_DESKTOPGNOME_TERMINAL_SERVICESHLVLXDG_SEATMODULEPATHGDMSESSIONLOGNAMEDBUS_SESSION_BUS_ADDRESSXDG_RUNTIME_DIRXAUTHORITYMODULEPATH_modsharePATHMODULESHOMEHISTSIZEGJS_DEBUG_TOPICSSESSION_MANAGERLESSOPENBASH_FUNC_module%%BASH_FUNC__module_raw%%BASH_FUNC_switchml%%BASH_FUNC_scl%%_PIP_DISABLE_PIP_VERSION_CHECKPYTHONDONTWRITEBYTECODEPIP_SHIMS_BASE_MODULEPIP_PYTHON_PATHPYTHONFINDER_IGNORE_UNSUPPORTEDPipenv–specific environment variables:
Debug–specific environment variables:
PATH: /home/kus/bin/flutter/bin:/home/kus/.symfony/bin:/home/kus/.local/bin:/home/kus/bin:/home/kus/bin/flutter/bin:/home/kus/.symfony/bin:/home/kus/.local/bin:/home/kus/bin:/home/kus/.cargo/bin:/home/kus/.nvm/versions/node/v11.7.0/bin:/home/kus/bin/flutter/bin:/home/kus/.symfony/bin:/home/kus/.local/bin:/home/kus/bin:/usr/share/Modules/bin:/home/kus/.cargo/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/kus/.composer/vendor/bin:/home/kus/.dotnet/toolsSHELL: /bin/bashLANG: en_US.UTF-8PWD: /home/kus/src/personal/scriptsContents of Pipfile ('/home/kus/src/personal/scripts/Pipfile'):
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
python-dotenv = "*"
[requires]
python_version = "3.7"
Contents of Pipfile.lock ('/home/kus/src/personal/scripts/Pipfile.lock'):
{
"_meta": {
"hash": {
"sha256": "460c68ee01296bbb390236c2df5047ef06ac87f6ba3a4dde6adbdb8418313b84"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.7"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
}
]
},
"default": {
"python-dotenv": {
"hashes": [
"sha256:a84569d0e00d178bc5b957f7ff208bf49287cbf61857c31c258c4a91f571527b",
"sha256:c9b1ddd3cdbe75c7d462cb84674d87130f4b948f090f02c7d7144779afb99ae0"
],
"index": "pypi",
"version": "==0.10.1"
}
},
"develop": {}
}
[kus@asus-vivobook scripts]$ pipenv run python pinpoint.py
Creating a virtualenv for this project…
Pipfile: /home/kus/src/personal/scripts/Pipfile
Using /usr/bin/python3.7m (3.7.2) to create virtualenv…
⠧ Creating virtual environment...Using base prefix '/usr'
New python executable in /home/kus/.local/share/virtualenvs/scripts-Vch89g9b/bin/python3.7m
Also creating executable in /home/kus/.local/share/virtualenvs/scripts-Vch89g9b/bin/python
Installing setuptools, pip, wheel...done.
Running virtualenv with interpreter /usr/bin/python3.7m
✔ Successfully created virtual environment!
Virtualenv location: /home/kus/.local/share/virtualenvs/scripts-Vch89g9b
/home/kus/.local/share/virtualenvs/scripts-Vch89g9b/bin/python: can't open file 'pinpoint.py': [Errno 2] No such file or directory
[kus@asus-vivobook scripts]$ pipenv uninstall --all-dev
Traceback (most recent call last):
File "/usr/bin/pipenv", line 11, in
load_entry_point('pipenv==2018.11.26', 'console_scripts', 'pipenv')()
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 764, in __call__
return self.main(args, *kwargs)
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, *ctx.params)
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(args, *kwargs)
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, *kwargs)
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(args, *kwargs)
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
return f(get_current_context(), args, *kwargs)
File "/usr/lib/python3.7/site-packages/pipenv/cli/command.py", line 301, in uninstall
ctx=ctx
File "/usr/lib/python3.7/site-packages/pipenv/core.py", line 2012, in do_uninstall
from .vendor.packaging.utils import canonicalize_name
ModuleNotFoundError: No module named 'pipenv.vendor.packaging'
tried it on a second machine.
[kus@mcny ~]$ mkdir -p ~/src/newfolder
[kus@mcny ~]$ cd ~/src/newfolder
[kus@mcny newfolder]$ pipenv install
Creating a virtualenv for this project…
Pipfile: /home/kus/src/newfolder/Pipfile
Using /usr/bin/python3 (3.7.2) to create virtualenv…
⠹ Creating virtual environment...Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/kus/.local/share/virtualenvs/newfolder-XtsC3NV3/bin/python3
Also creating executable in /home/kus/.local/share/virtualenvs/newfolder-XtsC3NV3/bin/python
Installing setuptools, pip, wheel...done.
✔ Successfully created virtual environment!
Virtualenv location: /home/kus/.local/share/virtualenvs/newfolder-XtsC3NV3
Creating a Pipfile for this project…
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (a65489)!
Installing dependencies from Pipfile.lock (a65489)…
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
[kus@mcny newfolder]$ pipenv uninstall --all-dev
Traceback (most recent call last):
File "/usr/bin/pipenv", line 11, in
load_entry_point('pipenv==2018.11.26', 'console_scripts', 'pipenv')()
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 764, in __call__
return self.main(args, *kwargs)
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, *ctx.params)
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(args, *kwargs)
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, *kwargs)
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(args, *kwargs)
File "/usr/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
return f(get_current_context(), args, *kwargs)
File "/usr/lib/python3.7/site-packages/pipenv/cli/command.py", line 301, in uninstall
ctx=ctx
File "/usr/lib/python3.7/site-packages/pipenv/core.py", line 2012, in do_uninstall
from .vendor.packaging.utils import canonicalize_name
ModuleNotFoundError: No module named 'pipenv.vendor.packaging'
[kus@mcny newfolder]$ pipenv --support
$ pipenv --support
Pipenv version: '2018.11.26'
Pipenv location: '/usr/lib/python3.7/site-packages/pipenv'
Python location: '/usr/bin/python3'
Python installations found:
3.7.2: /usr/bin/python33.7.2: /usr/bin/python3.7mPEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.7.2',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '4.19.15-300.fc29.x86_64',
'platform_system': 'Linux',
'platform_version': '#1 SMP Mon Jan 14 16:32:35 UTC 2019',
'python_full_version': '3.7.2',
'python_version': '3.7',
'sys_platform': 'linux'}
System environment variables:
LS_COLORSSSH_CONNECTIONLANGHISTCONTROLHOSTNAMEXDG_SESSION_IDUSERSELINUX_ROLE_REQUESTEDPWDHOMESSH_CLIENTSELINUX_LEVEL_REQUESTEDSSH_TTYMAILTERMSHELLXMODIFIERSSELINUX_USE_CURRENT_RANGESHLVLLOGNAMEDBUS_SESSION_BUS_ADDRESSXDG_RUNTIME_DIRPATHHISTSIZELESSOPEN_OLDPWDPIP_DISABLE_PIP_VERSION_CHECKPYTHONDONTWRITEBYTECODEPIP_SHIMS_BASE_MODULEPIP_PYTHON_PATHPYTHONFINDER_IGNORE_UNSUPPORTEDPipenv–specific environment variables:
Debug–specific environment variables:
PATH: /home/kus/.local/bin:/home/kus/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbinSHELL: /bin/bashLANG: en_US.UTF-8PWD: /home/kus/src/newfolderContents of Pipfile ('/home/kus/src/newfolder/Pipfile'):
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
[requires]
python_version = "3.7"
Contents of Pipfile.lock ('/home/kus/src/newfolder/Pipfile.lock'):
{
"_meta": {
"hash": {
"sha256": "7e7ef69da7248742e869378f8421880cf8f0017f96d94d086813baa518a65489"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.7"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
}
]
},
"default": {},
"develop": {}
}
[kus@mcny newfolder]$ exit
logout
how did you install pipenv? what linux distribution are you using? looks to me like some attempt at distro unpackaging gone wrong here.
fedora 29 with dnf install pipenv
nice, at least there's hope of it getting fixed then
in the meantime you can pip install --user pipenv and hopefully fedora has that on your path by default.
/cc @hroncok sorry for the inconsistent references :(
Ouch. On it.
I have a Fedora fix ready with a grep check for this to not happen again.
@hroncok I'd somehow missed (or managed to forget) that you had a system level pipenv package together. Once this is fixed, I'll ditch my user install and switch to yours :)
Not an upstream bug though, so we can close this one.
Sure thing.
@9034725985 please use https://bugz.fedoraproject.org/pipenv for Fedora bugs next time. I'll gladly forward the report to upstream if i think it's an upstream bug.
Most helpful comment
I have a Fedora fix ready with a grep check for this to not happen again.