You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When you try to install a package that is not available (in the pypi or locally), pipenv gives a ambiguous error.
For example, here the real name of the package is python-dotenv but I accidentally tried to install it with pipenv install dotenv:
$ pipenv install dotenv
Loading .env environment variables...
Installing dotenv...
✔ Installation Succeeded
Installing dependencies from Pipfile.lock (ea4037)...
All dependencies are now up-to-date!
Upgrading dotenv in dependencies.
Building requirements...
Resolving dependencies...
✘ Locking Failed!
⠦ Locking packages...False
<console width=182 ColorSystem.TRUECOLOR>
Traceback (most recent call last):
File "/usr/bin/pipenv", line 8, in <module>
sys.exit(cli())
^^^^^
File "/usr/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/pipenv/cli/options.py", line 52, in main
return super().main(*args, **kwargs, windows_expand_args=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/pipenv/vendor/click/decorators.py", line 92, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/pipenv/cli/command.py", line 207, in install
do_install(
File "/usr/lib/python3.12/site-packages/pipenv/routines/install.py", line 310, in do_install
new_packages, _ = handle_new_packages(
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/pipenv/routines/install.py", line 114, in handle_new_packages
do_update(
File "/usr/lib/python3.12/site-packages/pipenv/routines/update.py", line 75, in do_update
upgrade(
File "/usr/lib/python3.12/site-packages/pipenv/routines/update.py", line 364, in upgrade
upgrade_lock_data = venv_resolve_deps(
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/pipenv/utils/resolver.py", line 907, in venv_resolve_deps
c = resolve(cmd, st, project=project)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/pipenv/utils/resolver.py", line 771, in resolve
raise RuntimeError("Failed to lock Pipfile.lock!")
RuntimeError: Failed to lock Pipfile.lock!
Describe the solution you'd like
It should clearly gives error that "Didn't find the package".
Is your feature request related to a problem? Please describe.
When you try to install a package that is not available (in the pypi or locally), pipenv gives a ambiguous error.
For example, here the real name of the package is
python-dotenv
but I accidentally tried to install it withpipenv install dotenv
:Describe the solution you'd like
It should clearly gives error that "Didn't find the package".
Additional context
$ pipenv --support
Pipenv version:
'2024.4.0'
Pipenv location:
'/usr/lib/python3.12/site-packages/pipenv'
Python location:
'/usr/bin/python'
OS Name:
'posix'
User pip version:
'24.3.1'
user Python installations found:
PEP 508 Information:
System environment variables:
SHELL
SESSION_MANAGER
COLORTERM
XDG_CONFIG_DIRS
FUNCNEST
POSTGRES_HOST
XDG_SESSION_PATH
XDG_MENU_PREFIX
TERM_PROGRAM_VERSION
PIPENV_ACTIVE
ICEAUTHORITY
POSTGRES_PASSWORD
LC_ADDRESS
LC_NAME
DEV_MODE
MEMORY_PRESSURE_WRITE
DESKTOP_SESSION
LC_MONETARY
GTK_RC_FILES
NO_AT_BRIDGE
EDITOR
XDG_SEAT
PWD
LOGNAME
XDG_SESSION_DESKTOP
XDG_SESSION_TYPE
SYSTEMD_EXEC_PID
XAUTHORITY
VSCODE_GIT_ASKPASS_NODE
MOTD_SHOWN
GTK2_RC_FILES
PIP_PYTHON_PATH
HOME
LANG
LC_PAPER
XDG_CURRENT_DESKTOP
VIRTUAL_ENV
MEMORY_PRESSURE_WATCH
WAYLAND_DISPLAY
SECRET_KEY
GIT_ASKPASS
XDG_SEAT_PATH
INVOCATION_ID
DJANGO_ALLOWED_HOSTS
MANAGERPID
CHROME_DESKTOP
KDE_SESSION_UID
QV4_GC_TIMELIMIT
VSCODE_GIT_ASKPASS_EXTRA_ARGS
XKB_DEFAULT_LAYOUT
USE_POSTGRES
XDG_SESSION_CLASS
LC_IDENTIFICATION
TERM
USER
PIP_DISABLE_PIP_VERSION_CHECK
VSCODE_GIT_IPC_HANDLE
POSTGRES_PORT
QT_WAYLAND_RECONNECT
KDE_SESSION_VERSION
PAM_KWALLET5_LOGIN
DISPLAY
SHLVL
POSTGRES_USER
MOZ_ENABLE_WAYLAND
LC_TELEPHONE
LC_MEASUREMENT
XDG_VTNR
XDG_SESSION_ID
VIRTUAL_ENV_PROMPT
PYTHONDONTWRITEBYTECODE
XDG_RUNTIME_DIR
PS1
DEBUGINFOD_URLS
LC_TIME
VSCODE_GIT_ASKPASS_MAIN
QT_AUTO_SCREEN_SCALE_FACTOR
JOURNAL_STREAM
XDG_DATA_DIRS
KDE_FULL_SESSION
GDK_BACKEND
BROWSER
PATH
ORIGINAL_XDG_CURRENT_DESKTOP
DBUS_SESSION_BUS_ADDRESS
KDE_APPLICATIONS_AS_SCOPE
MAIL
POSTGRES_DB
LC_NUMERIC
TERM_PROGRAM
_
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
PIPENV_ACTIVE
:1
Debug–specific environment variables:
PATH
:/home/mohammad/.local/share/virtualenvs/Beenaab_project-J2PSbtNd/bin:/home/mohammad/.cargo/bin:/home/mohammad/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/var/lib/flatpak/exports/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
SHELL
:/bin/bash
EDITOR
:nano
LANG
:en_US.UTF-8
PWD
:/home/mohammad/Documents/Work/Beenaab/Beenaab_project
VIRTUAL_ENV
:/home/mohammad/.local/share/virtualenvs/Beenaab_project-J2PSbtNd
Contents of
Pipfile
('/home/mohammad/Documents/Work/Beenaab/Beenaab_project/Pipfile'):Contents of
Pipfile.lock
('/home/mohammad/Documents/Work/Beenaab/Beenaab_project/Pipfile.lock'):The text was updated successfully, but these errors were encountered: