pipenv install -e .
puts the following line in Pipfile:
"e1839a8" = {path = ".", editable = true}
which makes uninstalling the package hard – pipenv uninstall .
doesn't work ("no package . to remove from Pipfile"), and pipenv uninstall e1839a8
doesn't actually uninstall the package (it removes it from Pipfile, but pip list
still shows it as installed).
$ python -m pipenv.help output
Pipenv version: '11.9.0'
Pipenv location: '/home/josh/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv'
Python location: '/home/josh/.local/venvs/pipenv/bin/python'
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/josh/old_some/.venv/bin/python3.6m
3.6
: /home/josh/old_some/.venv/bin/python3.6
3.6
: /usr/bin/python3.6
3.6.3
: /home/josh/old_some/.venv/bin/python
2.7.12
: /usr/bin/python
2.7.12
: /usr/bin/python2
3.6.3
: /home/josh/old_some/.venv/bin/python3
3.5.2
: /usr/bin/python3
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.6.3',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '4.13.0-38-generic',
'platform_system': 'Linux',
'platform_version': '#43~16.04.1-Ubuntu SMP Wed Mar 14 17:48:43 UTC 2018',
'python_full_version': '3.6.3',
'python_version': '3.6',
'sys_platform': 'linux'}
System environment variables:
CLUTTER_IM_MODULE
PIPENV_VENV_IN_PROJECT
PYTHONUNBUFFERED
NVM_DIR
LS_COLORS
GNOME_KEYRING_PID
GIT_PS1_SHOWUNTRACKEDFILES
XDG_CONFIG_HOME
LESSCLOSE
LANG
GDM_LANG
LESS
DISPLAY
PYENV_ROOT
OLDPWD
WORKON_HOME
EDITOR
COMPIZ_CONFIG_PROFILE
GTK2_MODULES
GPG_TTY
UPSTART_INSTANCE
PIPENV_SHELL_FANCY
DEBFULLNAME
XDG_VTNR
RIPGREP_CONFIG_PATH
SSH_AUTH_SOCK
VIRTUAL_ENV
MANDATORY_PATH
SESSIONTYPE
TMUX_PLUGIN_MANAGER_PATH
XDG_SESSION_ID
XDG_GREETER_DATA_DIR
USER
DESKTOP_SESSION
JOB
QT4_IM_MODULE
GOPATH
PIP_PYTHON_PATH
DEFAULTS_PATH
QT_QPA_PLATFORMTHEME
PWD
MANPAGER
HOME
GIT_PS1_SHOWDIRTYSTATE
SSH_AGENT_PID
QT_ACCESSIBILITY
TMUX
XDG_SESSION_TYPE
XDG_DATA_DIRS
UPSTART_SESSION
PIPENV_ACTIVE
XDG_SESSION_DESKTOP
GIT_PS1_SHOWUPSTREAM
GTK_MODULES
UPSTART_EVENTS
VISUAL
VTE_VERSION
TERM
SHELL
GNOME_KEYRING_CONTROL
XDG_SEAT_PATH
QT_IM_MODULE
XMODIFIERS
IM_CONFIG_PHASE
GIT_PS1_SHOWSTASHSTATE
INSTANCE
XDG_CURRENT_DESKTOP
GPG_AGENT_INFO
QT_LINUX_ACCESSIBILITY_ALWAYS_ON
TMUX_VERSION
TMUX_PANE
PYTHONDONTWRITEBYTECODE
XDG_SEAT
SHLVL
LANGUAGE
WINDOWID
DEBEMAIL
GDMSESSION
GNOME_DESKTOP_SESSION_ID
XDG_CACHE_HOME
LOGNAME
DBUS_SESSION_BUS_ADDRESS
UPSTART_JOB
XDG_RUNTIME_DIR
XAUTHORITY
XDG_DATA_HOME
XDG_SESSION_PATH
XDG_CONFIG_DIRS
PATH
LESSOPEN
GTK_IM_MODULE
_
Pipenv–specific environment variables:
PIPENV_VENV_IN_PROJECT
: 1
PIPENV_SHELL_FANCY
: 1
PIPENV_ACTIVE
: 1
Debug–specific environment variables:
PATH
: /home/josh/old_some/.venv/bin:/home/josh/go/bin:/home/josh/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/josh/.cargo/bin:/home/josh/.cabal/bin:/home/josh/bin:/home/josh/.local/bin
SHELL
: /bin/bash
EDITOR
: vim
LANG
: en_GB.UTF-8
PWD
: /home/josh/old_some
VIRTUAL_ENV
: /home/josh/old_some/.venv
Contents of Pipfile
('/home/josh/old_some/Pipfile'):
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
"e1839a8" = {path = ".", editable = true}
[dev-packages]
mypy = "*"
"flake8" = "*"
twine = "*"
check-manifest = "*"
pyroma = "*"
"flake8-bugbear" = "*"
[requires]
python_version = "3.6"
Contents of Pipfile.lock
('/home/josh/old_some/Pipfile.lock'):
{
"_meta": {
"hash": {
"sha256": "8a94a0e4791bcdf8b19c0eacc0e41e9c10acbdb973390a994b5c21cfca0bfb7c"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.6"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.python.org/simple",
"verify_ssl": true
}
]
},
"default": {
"e1839a8": {
"editable": true,
"path": "."
}
},
"develop": {
"attrs": {
"hashes": [
"sha256:1c7960ccfd6a005cd9f7ba884e6316b5e430a3f1a6c37c5f87d8b43f83b54ec9",
"sha256:a17a9573a6f475c99b551c0e0a812707ddda1ec9653bed04c13841404ed6f450"
],
"version": "==17.4.0"
},
"certifi": {
"hashes": [
"sha256:14131608ad2fd56836d33a71ee60fa1c82bc9d2c8d98b7bdbc631fe1b3cd1296",
"sha256:edbc3f203427eef571f79a7692bb160a2b0f7ccaa31953e99bd17e307cf63f7d"
],
"version": "==2018.1.18"
},
"chardet": {
"hashes": [
"sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae",
"sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"
],
"version": "==3.0.4"
},
"check-manifest": {
"hashes": [
"sha256:2bb906a736a0f026cc5fd6c0dab5a481793b3d7a7d70106cca6e238da5f52d84",
"sha256:c02fff2686a24bc48f625723c9d20d6866045c734300abe3d5564edb652192bc"
],
"index": "pypi",
"version": "==0.36"
},
"docutils": {
"hashes": [
"sha256:02aec4bd92ab067f6ff27a38a38a41173bf01bed8f89157768c1573f53e474a6",
"sha256:51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274",
"sha256:7a4bd47eaf6596e1295ecb11361139febe29b084a87bf005bf899f9a42edc3c6"
],
"version": "==0.14"
},
"flake8": {
"hashes": [
"sha256:7253265f7abd8b313e3892944044a365e3f4ac3fcdcfb4298f55ee9ddf188ba0",
"sha256:c7841163e2b576d435799169b78703ad6ac1bbb0f199994fc05f700b2a90ea37"
],
"index": "pypi",
"version": "==3.5.0"
},
"flake8-bugbear": {
"hashes": [
"sha256:541746f0f3b2f1a8d7278e1d2d218df298996b60b02677708560db7c7e620e3b",
"sha256:5f14a99d458e29cb92be9079c970030e0dd398b2decb179d76d39a5266ea1578"
],
"index": "pypi",
"version": "==18.2.0"
},
"idna": {
"hashes": [
"sha256:2c6a5de3089009e3da7c5dde64a141dbc8551d5b7f6cf4ed7c2568d0cc520a8f",
"sha256:8c7309c718f94b3a625cb648ace320157ad16ff131ae0af362c9f21b80ef6ec4"
],
"version": "==2.6"
},
"mccabe": {
"hashes": [
"sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42",
"sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"
],
"version": "==0.6.1"
},
"mypy": {
"hashes": [
"sha256:3bd95a1369810f7693366911d85be9f0a0bd994f6cb7162b7a994e5ded90e3d9",
"sha256:7247f9948d7cdaae9408a4ee1662a01853c24e668117b4419acf025b05fbe3ce"
],
"index": "pypi",
"version": "==0.580"
},
"pkginfo": {
"hashes": [
"sha256:5878d542a4b3f237e359926384f1dde4e099c9f5525d236b1840cf704fa8d474",
"sha256:a39076cb3eb34c333a0dd390b568e9e1e881c7bf2cc0aee12120636816f55aee"
],
"version": "==1.4.2"
},
"pycodestyle": {
"hashes": [
"sha256:682256a5b318149ca0d2a9185d365d8864a768a28db66a84a2ea946bcc426766",
"sha256:6c4245ade1edfad79c3446fadfc96b0de2759662dc29d07d80a6f27ad1ca6ba9"
],
"version": "==2.3.1"
},
"pyflakes": {
"hashes": [
"sha256:08bd6a50edf8cffa9fa09a463063c425ecaaf10d1eb0335a7e8b1401aef89e6f",
"sha256:8d616a382f243dbf19b54743f280b80198be0bca3a5396f1d2e1fca6223e8805"
],
"version": "==1.6.0"
},
"pyroma": {
"hashes": [
"sha256:fd00280a737f99094aed0b9d6b52456f53ca28803a7c5fb05055a6a071ae9659"
],
"index": "pypi",
"version": "==2.3"
},
"requests": {
"hashes": [
"sha256:6a1b267aa90cac58ac3a765d067950e7dbbf75b1da07e895d1f594193a40a38b",
"sha256:9c443e7324ba5b85070c4a818ade28bfabedf16ea10206da1132edaa6dda237e"
],
"version": "==2.18.4"
},
"requests-toolbelt": {
"hashes": [
"sha256:42c9c170abc2cacb78b8ab23ac957945c7716249206f90874651971a4acff237",
"sha256:f6a531936c6fa4c6cfce1b9c10d5c4f498d16528d2a54a22ca00011205a187b5"
],
"version": "==0.8.0"
},
"tqdm": {
"hashes": [
"sha256:4f2eb1d14804caf7095500fe11da0e481a47af912e7b57c93f886ac3c40a49dd",
"sha256:91ac47ec2ba6bb92b7ba37706f4dea37019ddd784b22fd279a4b12d93327191d"
],
"version": "==4.20.0"
},
"twine": {
"hashes": [
"sha256:08eb132bbaec40c6d25b358f546ec1dc96ebd2638a86eea68769d9e67fe2b129",
"sha256:2fd9a4d9ff0bcacf41fdc40c8cb0cfaef1f1859457c9653fd1b92237cc4e9f25"
],
"index": "pypi",
"version": "==1.11.0"
},
"typed-ast": {
"hashes": [
"sha256:0948004fa228ae071054f5208840a1e88747a357ec1101c17217bfe99b299d58",
"sha256:25d8feefe27eb0303b73545416b13d108c6067b846b543738a25ff304824ed9a",
"sha256:29464a177d56e4e055b5f7b629935af7f49c196be47528cc94e0a7bf83fbc2b9",
"sha256:2e214b72168ea0275efd6c884b114ab42e316de3ffa125b267e732ed2abda892",
"sha256:3e0d5e48e3a23e9a4d1a9f698e32a542a4a288c871d33ed8df1b092a40f3a0f9",
"sha256:519425deca5c2b2bdac49f77b2c5625781abbaf9a809d727d3a5596b30bb4ded",
"sha256:57fe287f0cdd9ceaf69e7b71a2e94a24b5d268b35df251a88fef5cc241bf73aa",
"sha256:668d0cec391d9aed1c6a388b0d5b97cd22e6073eaa5fbaa6d2946603b4871efe",
"sha256:68ba70684990f59497680ff90d18e756a47bf4863c604098f10de9716b2c0bdd",
"sha256:6de012d2b166fe7a4cdf505eee3aaa12192f7ba365beeefaca4ec10e31241a85",
"sha256:79b91ebe5a28d349b6d0d323023350133e927b4de5b651a8aa2db69c761420c6",
"sha256:8550177fa5d4c1f09b5e5f524411c44633c80ec69b24e0e98906dd761941ca46",
"sha256:a8034021801bc0440f2e027c354b4eafd95891b573e12ff0418dec385c76785c",
"sha256:bc978ac17468fe868ee589c795d06777f75496b1ed576d308002c8a5756fb9ea",
"sha256:c05b41bc1deade9f90ddc5d988fe506208019ebba9f2578c622516fd201f5863",
"sha256:c9b060bd1e5a26ab6e8267fd46fc9e02b54eb15fffb16d112d4c7b1c12987559",
"sha256:edb04bdd45bfd76c8292c4d9654568efaedf76fe78eb246dde69bdb13b2dad87",
"sha256:f19f2a4f547505fe9072e15f6f4ae714af51b5a681a97f187971f50c283193b6"
],
"version": "==1.1.0"
},
"urllib3": {
"hashes": [
"sha256:06330f386d6e4b195fbfc736b297f58c5a892e4440e54d294d7004e3a9bbea1b",
"sha256:cc44da8e1145637334317feebd728bd869a35285b93cbb4cca2577da7e62db4f"
],
"version": "==1.22"
}
}
}
Ideally, Pipenv would put the package's name in Pipfile, so it can be uninstalled properly with minimal pain. If that's not possible, would "."
work?
The name of the package is listed as e1839a8
– the last 7 hex digits of the SHA-256 hash of .
– which is essentially meaningless.
pipenv install -e .
pipenv uninstall . # doesn't work
pipenv update . # doesn't work
This seems very reasonable.
Related to pypa/pipfile#93
Does this also apply to VCS and local archive installations? IIRC they use the hash naming as well. The solution might be to peek into the metadata (running egg_info
?) to find the “real” package name.
In general the current release is bugged in its handling of local vcs repositories. If you install an editable filesystem path as a relative path that is how we should lock it, it should only lock as a vcs repository if you explicitly pass a file uri or possibly an abspath (needs more thought there so I’ll default to no).
But in general you’re going to have to specify an egg fragment for a uri so this shouldn’t be an issue there
The meaningless hash problem is fixed in sarugaku/requirementslib#3 🎉
We can probably in the future also allow uninstallation through relative path, but that would be very low-priority. Anyone willing to work on this can still do :)
Most helpful comment
The meaningless hash problem is fixed in sarugaku/requirementslib#3 🎉