pipenv install python-dotenv fails
See original GitHub issueI can run command below without errors:
pip install python-dotenv
But the command below here fails with the following exception:
pipenv install python-dotenv
It fails both on Windows and Ubuntu.
PS D:\Workspace\GitKraken\myproject> pipenv install python-dotenv
Installing python-dotenv…
Adding python-dotenv to Pipfile's [packages]…
Installation Succeeded
Pipfile.lock (d08e7f) out of date, updating to (d6c0c7)…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Locking Failed!
Traceback (most recent call last):
File "c:/users/tb/appdata/local/programs/python/python36/lib/site-packages/pipenv/resolver.py", line 126, in <module>
main()
File "c:/users/tb/appdata/local/programs/python/python36/lib/site-packages/pipenv/resolver.py", line 119, in main
parsed.requirements_dir, parsed.packages)
File "c:/users/tb/appdata/local/programs/python/python36/lib/site-packages/pipenv/resolver.py", line 85, in _main
requirements_dir=requirements_dir,
File "c:/users/tb/appdata/local/programs/python/python36/lib/site-packages/pipenv/resolver.py", line 69, in resolve
req_dir=requirements_dir
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\utils.py", line 726, in resolve_deps
req_dir=req_dir,
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\utils.py", line 480, in actually_resolve_deps
resolved_tree = resolver.resolve()
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\utils.py", line 385, in resolve
results = self.resolver.resolve(max_rounds=environments.PIPENV_MAX_ROUNDS)
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\piptools\resolver.py", line 102, in resolve
has_changed, best_matches = self._resolve_one_round()
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\piptools\resolver.py", line 206, in _resolve_one_round
for dep in self._iter_dependencies(best_match):
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\piptools\resolver.py", line 301, in _iter_dependencies
dependencies = self.repository.get_dependencies(ireq)
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\piptools\repositories\pypi.py", line 234, in get_dependencies
legacy_results = self.get_legacy_dependencies(ireq)
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\piptools\repositories\pypi.py", line 426, in get_legacy_dependencies
results, ireq = self.resolve_reqs(download_dir, ireq, wheel_cache)
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\piptools\repositories\pypi.py", line 297, in resolve_reqs
results = resolver._resolve_one(reqset, ireq)
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\notpip\_internal\resolve.py", line 260, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\notpip\_internal\resolve.py", line 213, in _get_abstract_dist_for
self.require_hashes
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\notpip\_internal\operations\prepare.py", line 294, in prepare_linked_requirement
abstract_dist.prep_for_dist(finder, self.build_isolation)
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\notpip\_internal\operations\prepare.py", line 127, in prep_for_dist
self.req.run_egg_info()
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\notpip\_internal\req\req_install.py", line 474, in run_egg_info
command_desc='python setup.py egg_info')
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\notpip\_internal\utils\misc.py", line 705, in call_subprocess
% (command_desc, proc.returncode, cwd))
pipenv.patched.notpip._internal.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in C:\Users\TB\AppData\Local\Temp\tmp_yfw20yxbuild\dotenv\
File "c:/users/tb/appdata/local/programs/python/python36/lib/site-packages/pipenv/resolver.py", line 126, in <module>
main()
File "c:/users/tb/appdata/local/programs/python/python36/lib/site-packages/pipenv/resolver.py", line 119, in main
parsed.requirements_dir, parsed.packages)
File "c:/users/tb/appdata/local/programs/python/python36/lib/site-packages/pipenv/resolver.py", line 85, in _main
requirements_dir=requirements_dir,
File "c:/users/tb/appdata/local/programs/python/python36/lib/site-packages/pipenv/resolver.py", line 69, in resolve
req_dir=requirements_dir
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\utils.py", line 726, in resolve_deps
req_dir=req_dir,
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\utils.py", line 480, in actually_resolve_deps
resolved_tree = resolver.resolve()
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\utils.py", line 385, in resolve
results = self.resolver.resolve(max_rounds=environments.PIPENV_MAX_ROUNDS)
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\piptools\resolver.py", line 102, in resolve
has_changed, best_matches = self._resolve_one_round()
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\piptools\resolver.py", line 206, in _resolve_one_round
for dep in self._iter_dependencies(best_match):
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\piptools\resolver.py", line 301, in _iter_dependencies
dependencies = self.repository.get_dependencies(ireq)
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\piptools\repositories\pypi.py", line 234, in get_dependencies
legacy_results = self.get_legacy_dependencies(ireq)
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\piptools\repositories\pypi.py", line 426, in get_legacy_dependencies
results, ireq = self.resolve_reqs(download_dir, ireq, wheel_cache)
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\piptools\repositories\pypi.py", line 297, in resolve_reqs
results = resolver._resolve_one(reqset, ireq)
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\notpip\_internal\resolve.py", line 260, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\notpip\_internal\resolve.py", line 213, in _get_abstract_dist_for
self.require_hashes
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\notpip\_internal\operations\prepare.py", line 294, in prepare_linked_requirement
abstract_dist.prep_for_dist(finder, self.build_isolation)
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\notpip\_internal\operations\prepare.py", line 127, in prep_for_dist
self.req.run_egg_info()
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\notpip\_internal\req\req_install.py", line 474, in run_egg_info
command_desc='python setup.py egg_info')
File "c:\users\tb\appdata\local\programs\python\python36\lib\site-packages\pipenv\patched\notpip\_internal\utils\misc.py", line 705, in call_subprocess
% (command_desc, proc.returncode, cwd))
pipenv.patched.notpip._internal.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in C:\Users\TB\AppData\Local\Temp\tmp_yfw20yxbuild\dotenv\
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:9
Top Results From Across the Web
pip install dotenv error code 1 Windows 10 - Stack Overflow
I am trying to run pip install dotenv or python -m pip install dotenv and neither of the two work. I get the...
Read more >ModuleNotFoundError: No module named 'dotenv' in Python
The Python "ModuleNotFoundError: No module named 'dotenv'" occurs when we forget to install the python-dotenv module before importing it or ...
Read more >python-dotenv - PyPI
Getting Started. pip install python-dotenv. If your application takes its configuration from environment variables, like a 12-factor application, launching it ...
Read more >Advanced Usage of Pipenv - Read the Docs
pipenv install --deploy. This will fail a build if the Pipfile.lock is out–of–date, instead of generating a new one. Or you can install...
Read more >no module named 'dotenv' - You.com | The Search Engine ...
1. Trying these and re-installing dotenv fixed this issue: pip uninstall dotenv pip uninstall python-dotenv pip install python-dotenv. Also you may have dotenv ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@richiebful This is not a solution for everybody. In my case i am using pyenv for virtual environment handling and pipenv only for the package management. In this scenario
pipenv shell
would create a new environment that doesn’t meet my conventions.But back to topic: I had the same error because i made a mistake: i tried to install dotenv instead of python-dotenv. I realized my error but dotenv was staying in the Pipfile and caused the error again and again until i found and removed it from Pipfile 😃
At least in my Ubuntu environment,
pipenv install python-dotenv
was successful. Please post more detailed information on the failure (OS, Python version, pipenv version, other package versions, etc.).