Frequently Encountered PiPenv Problems¶
Pipenv is constantly being improved by volunteers, but is still a very young project with limited resources, and has some quirks that needs to be dealt with. We need everyone’s help (including yours!).
Here are some common questions people have using Pipenv. Please take a look below and see if they resolve your problem.
Make sure you’re running the newest Pipenv version first!
☤ Your dependencies could not be resolved¶
Make sure your dependencies actually do resolve. If you’re confident they are, you may need to clear your resolver cache. Run the following command::
pipenv lock --clear
and try again.
If this does not work, try manually deleting the whole cache directory. It is usually one of the following locations:
~/.cache/pipenv(other operating systems)
Pipenv does not install pre-releases (i.e. a version with an alpha/beta/etc.
suffix, such as 1.0b1) by default. You will need to pass the
in your command, or set
allow_prereleases = true
in your Pipfile.
☤ No module named
This is usually a result of mixing Pipenv with system packages. We strongly recommend installing Pipenv in an isolated environment. Uninstall all existing Pipenv installations, and see installing pipenv to choose one of the recommended way to install Pipenv instead.
☤ My pyenv-installed Python is not found¶
Make sure you have
PYENV_ROOT set correctly. Pipenv only supports CPython
distributions, with version name like
3.6.4 or similar.
☤ Pipenv does not respect pyenv’s global and local Python versions¶
Pipenv by default uses the Python it is installed against to create the
virtualenv. You can set the
--python option to
$(pyenv which python) to use your current pyenv interpreter. See specifying versions for more information.
☤ ValueError: unknown locale: UTF-8¶
macOS has a bug in its locale detection that prevents us from detecting your shell encoding correctly. This can also be an issue on other systems if the locale variables do not specify an encoding.
The workaround is to set the following two environment variables to a standard localization format:
For Zsh, the file to edit is
You can change both the
UTF-8 part to the language/locale and encoding you use.
☤ /bin/pip: No such file or directory¶
This may be related to your locale setting. See here for a possible solution.
No, it does not, intentionally. Pipfile and setup.py serve different purposes, and should not consider each other by default. See :ref:
pipfile-vs-setuppy for more information.
pipenv run in Supervisor program¶
When you configure a supervisor program’s
pipenv run ..., you need to set locale environment variables properly to make it work.
Add this line under
[supervisord] section in
☤ An exception is raised during
pipenv lock --clear and try again. The lock sequence caches results to speed up subsequent runs. The cache may contain faulty results if a bug causes the format to corrupt, even after the bug is fixed.
--clear flushes the cache, and therefore removes the bad results.