Giter VIP home page Giter VIP logo

dotenv's Introduction

Python Dot Env Handler

Shell Command and Library to write and read .env like files.

Latest Version Build Status Coverage Status

.env files are commonly used with Procfile-based apps.

Usage

Shell

Inspect file

$ dotenv
FOO: bar
Bar: baz

Get value for key

$ dotenv FOO
FOO: bar

Set value for key

$ dotenv FOO baz
FOO: baz

As a library

>>> from dotenv import Dotenv
>>> dotenv = Dotenv('/path/to/.env')
>>> print dotenv
{"FOO": "bar", "Bar": "baz"}
>>> dotenv['FOO']
"bar"
>>> dotenv['FOO'] = "baz"
>>> dotenv['FOO']
"baz"
>>> del dotenv['FOO']
>>> print dotenv
{"Bar": "baz"}

Every action is persisted.

Use with Django

# add this to manage.py above `execute_from_command_line(sys.argv)`

from dotenv import Dotenv
dotenv = Dotenv(os.path.join(os.path.dirname(__file__), '.env'))
os.environ.update(dotenv)

dotenv's People

Contributors

adelevie avatar mhubig avatar msabramo avatar pedroburon avatar saxbophone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dotenv's Issues

Setup Tool subprocess error

Seems the setuptools.installer is deprecated from the error message. Hence the installation keeps failing. Is this repo still maintained?

Below it the error:

SetuptoolsDepreca
tionWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
error: subprocess-exited-with-error

    python setup.py egg_info did not run successfully.
    exit code: 1
 
    [21 lines of output]
    Traceback (most recent call last):
      File "<string>", line 2, in <module>
      File "<pip-setuptools-caller>", line 14, in <module>
      File "C:\Users\saopiyo\AppData\Local\Temp\pip-wheel-bbck_tx8\distribute_38fc165667754416841c45a3c56dccd

6\setuptools_init_.py", line 2, in
from setuptools.extension import Extension, Library
File "C:\Users\saopiyo\AppData\Local\Temp\pip-wheel-bbck_tx8\distribute_38fc165667754416841c45a3c56dccd
6\setuptools\extension.py", line 5, in
from setuptools.dist import _get_unpatched
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in load_unlocked
File "G:\codeprojects\virtual-AI-Salesperson\venv\lib\site-packages_virtualenv.py", line 89, in exec_m
odule
old(module)
File "C:\Users\saopiyo\AppData\Local\Temp\pip-wheel-bbck_tx8\distribute_38fc165667754416841c45a3c56dccd
6\setuptools\dist.py", line 7, in
from setuptools.command.install import install
File "C:\Users\saopiyo\AppData\Local\Temp\pip-wheel-bbck_tx8\distribute_38fc165667754416841c45a3c56dccd
6\setuptools\command_init
.py", line 8, in
from setuptools.command import install_scripts
File "C:\Users\saopiyo\AppData\Local\Temp\pip-wheel-bbck_tx8\distribute_38fc165667754416841c45a3c56dccd
6\setuptools\command\install_scripts.py", line 3, in
from pkg_resources import Distribution, PathMetadata, ensure_directory
File "C:\Users\saopiyo\AppData\Local\Temp\pip-wheel-bbck_tx8\distribute_38fc165667754416841c45a3c56dccd
6\pkg_resources.py", line 1518, in
register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
[end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
  error: metadata-generation-failed
 
  Encountered error while generating package metadata.
 
  See above for output.
 
  note: This is an issue with the package mentioned above, not pip.
  hint: See above for details.
  Traceback (most recent call last):
    File "G:\codeprojects\virtual-AI-Salesperson\venv\lib\site-packages\setuptools\installer.py", line 82, in

fetch_build_egg
subprocess.check_call(cmd)
File "C:\Users\saopiyo\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 373, in check_call

      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['G:\\codeprojects\\virtual-AI-Salesperson\\venv\\Scripts\\python.e

xe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\Users\saopiyo\AppData\Local
\Temp\tmpft2se_65', '--quiet', 'distribute']' returned non-zero exit status 1.

  The above exception was the direct cause of the following exception:
 
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "C:\Users\saopiyo\AppData\Local\Temp\pip-install-acn95z_0\dotenv_62eeeb5132d74befbd3e94d5282d3fab\se

tup.py", line 13, in
setup(name='dotenv',
File "G:\codeprojects\virtual-AI-Salesperson\venv\lib\site-packages\setuptools_init_.py", line 86, in
setup
install_setup_requires(attrs)
File "G:\codeprojects\virtual-AI-Salesperson\venv\lib\site-packages\setuptools_init
.py", line 80, in
install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "G:\codeprojects\virtual-AI-Salesperson\venv\lib\site-packages\setuptools\dist.py", line 876, in fet
ch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "G:\codeprojects\virtual-AI-Salesperson\venv\lib\site-packages\pkg_resources_init
.py", line 789,
in resolve
dist = best[req.key] = env.best_match(
File "G:\codeprojects\virtual-AI-Salesperson\venv\lib\site-packages\pkg_resources_init_.py", line 1075
, in best_match
return self.obtain(req, installer)
File "G:\codeprojects\virtual-AI-Salesperson\venv\lib\site-packages\pkg_resources_init_.py", line 1087
, in obtain
return installer(requirement)
File "G:\codeprojects\virtual-AI-Salesperson\venv\lib\site-packages\setuptools\dist.py", line 956, in fet
ch_build_egg
return fetch_build_egg(self, req)
File "G:\codeprojects\virtual-AI-Salesperson\venv\lib\site-packages\setuptools\installer.py", line 84, in
fetch_build_egg
raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['G:\codeprojects\virtual-AI-Salesperson\venv\Scripts\python
.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\Users\saopiyo\AppData\Loca
l\Temp\tmpft2se_65', '--quiet', 'distribute']' returned non-zero exit status 1.
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

[notice] A new release of pip available: 22.1.2 -> 22.2

Issue installing with `pipenv `

Error while installing with pipenv

This pops out while trying to install with pipenv on python 3.10.0

Loading .env environment variables...
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Installing dotenv...
[  ==] Installing dotenv...[31m[1mError: [0m An error occurred while installing [32mdotenv[0m!
Error text: Collecting dotenv
  Downloading dotenv-0.0.5.tar.gz (2.4 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'

[    ] Installing dotenv...[36m  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [71 lines of output]
      C:\Users\Acer\.virtualenvs\tate-bois-96ZGWPKM\lib\site-packages\setuptools\installer.py:27:
SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.    
        warnings.warn(
        error: subprocess-exited-with-error

        × python setup.py egg_info did not run successfully.
        │ exit code: 1
        ╰─> [21 lines of output]
            Traceback (most recent call last):
              File "<string>", line 2, in <module>
              File "<pip-setuptools-caller>", line 14, in <module>
              File
"C:\Users\Acer\AppData\Local\Temp\pip-wheel-igaoeoe8\distribute_91bd652c93664ef384252db0352b544d\setuptools\__init__.py", line
2, in <module>
                from setuptools.extension import Extension, Library
              File
"C:\Users\Acer\AppData\Local\Temp\pip-wheel-igaoeoe8\distribute_91bd652c93664ef384252db0352b544d\setuptools\extension.py",    
line 5, in <module>
                from setuptools.dist import _get_unpatched
              File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
              File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
              File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
              File "C:\Users\Acer\.virtualenvs\tate-bois-96ZGWPKM\lib\site-packages\_virtualenv.py", line 89, in exec_module  
                old(module)
              File
"C:\Users\Acer\AppData\Local\Temp\pip-wheel-igaoeoe8\distribute_91bd652c93664ef384252db0352b544d\setuptools\dist.py", line 7, 
in <module>
                from setuptools.command.install import install
              File
"C:\Users\Acer\AppData\Local\Temp\pip-wheel-igaoeoe8\distribute_91bd652c93664ef384252db0352b544d\setuptools\command\__init__.p
y", line 8, in <module>
                from setuptools.command import install_scripts
              File
"C:\Users\Acer\AppData\Local\Temp\pip-wheel-igaoeoe8\distribute_91bd652c93664ef384252db0352b544d\setuptools\command\install_sc
ripts.py", line 3, in <module>
                from pkg_resources import Distribution, PathMetadata, ensure_directory
              File
"C:\Users\Acer\AppData\Local\Temp\pip-wheel-igaoeoe8\distribute_91bd652c93664ef384252db0352b544d\pkg_resources.py", line 1518,
in <module>
                register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
            AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'


        note: This error originates from a subprocess, and is likely not a problem with pip.
      error: metadata-generation-failed

      × Encountered error while generating package metadata.
      ╰─> See above for output.

      note: This is an issue with the package mentioned above, not pip.
      hint: See above for details.
      Traceback (most recent call last):
        File "C:\Users\Acer\.virtualenvs\tate-bois-96ZGWPKM\lib\site-packages\setuptools\installer.py", line 82, in
fetch_build_egg
          subprocess.check_call(cmd)
        File "C:\Users\Acer\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 369, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['C:\\Users\\Acer\\.virtualenvs\\tate-bois-96ZGWPKM\\Scripts\\python.exe', '-m',
'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\Acer\\AppData\\Local\\Temp\\tmp9okbbypj',       
'--quiet', 'distribute']' returned non-zero exit status 1.

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\Acer\AppData\Local\Temp\pip-install-0d2di4_i\dotenv_2c6d416c54b94d5991ff437931b4f34c\setup.py", line   
13, in <module>
          setup(name='dotenv',
        File "C:\Users\Acer\.virtualenvs\tate-bois-96ZGWPKM\lib\site-packages\setuptools\__init__.py", line 86, in setup      
          _install_setup_requires(attrs)
        File "C:\Users\Acer\.virtualenvs\tate-bois-96ZGWPKM\lib\site-packages\setuptools\__init__.py", line 80, in
_install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "C:\Users\Acer\.virtualenvs\tate-bois-96ZGWPKM\lib\site-packages\setuptools\dist.py", line 874, in
fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "C:\Users\Acer\.virtualenvs\tate-bois-96ZGWPKM\lib\site-packages\pkg_resources\__init__.py", line 815, in resolve
          dist = self._resolve_dist(
        File "C:\Users\Acer\.virtualenvs\tate-bois-96ZGWPKM\lib\site-packages\pkg_resources\__init__.py", line 851, in        
_resolve_dist
          dist = best = env.best_match(
        File "C:\Users\Acer\.virtualenvs\tate-bois-96ZGWPKM\lib\site-packages\pkg_resources\__init__.py", line 1123, in       

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
[0m
This is likely caused by a bug in [32mdotenv[0m. Report this to its maintainers.
Installation Failed

Pipfile

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
flask = "*"
flask-login = "*"
requests = "*"

[dev-packages]
autopep8 = "*"

[requires]
python_version = "3.10"

AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'

This is the log:

(venv) H:\Programacao\Python\coolbot>pip install dotenv
Collecting dotenv
  Using cached dotenv-0.0.5.tar.gz (2.4 kB)
    ERROR: Command errored out with exit status 1:
     command: 'h:\programacao\python\coolbot\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\MSI GX63VR\\AppData\\Local\\Temp\\pip-install-xk9gkaoe\\dotenv\\setup.py'"'"'; __file__='"'"'C:\\Users\\MSI GX63VR\\AppData\\Local\\Temp\\pip-install-xk9gkaoe\\dotenv\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\MSI GX63VR\AppData\Local\Temp\pip-pip-egg-info-sg55hrk8'
         cwd: C:\Users\MSI GX63VR\AppData\Local\Temp\pip-install-xk9gkaoe\dotenv\
    Complete output (68 lines):
    Traceback (most recent call last):
      File "h:\programacao\python\coolbot\venv\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
        yield saved
      File "h:\programacao\python\coolbot\venv\lib\site-packages\setuptools\sandbox.py", line 194, in setup_context
        __import__('setuptools')
      File "C:\Users\MSIGX6~1\AppData\Local\Temp\easy_install-xy422xbf\distribute-0.7.3\setuptools\__init__.py", line 2, in <module>
      File "C:\Users\MSIGX6~1\AppData\Local\Temp\easy_install-xy422xbf\distribute-0.7.3\setuptools\extension.py", line 5, in <module>
      File "C:\Users\MSIGX6~1\AppData\Local\Temp\easy_install-xy422xbf\distribute-0.7.3\setuptools\dist.py", line 7, in <module>
      File "C:\Users\MSIGX6~1\AppData\Local\Temp\easy_install-xy422xbf\distribute-0.7.3\setuptools\command\__init__.py", line 8, in <module>
      File "C:\Users\MSIGX6~1\AppData\Local\Temp\easy_install-xy422xbf\distribute-0.7.3\setuptools\command\install_scripts.py", line 3, in <module>
      File "C:\Users\MSIGX6~1\AppData\Local\Temp\easy_install-xy422xbf\distribute-0.7.3\pkg_resources.py", line 1518, in <module>
    AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\MSI GX63VR\AppData\Local\Temp\pip-install-xk9gkaoe\dotenv\setup.py", line 13, in <module>
        setup(name='dotenv',
      File "h:\programacao\python\coolbot\venv\lib\site-packages\setuptools\__init__.py", line 144, in setup
        _install_setup_requires(attrs)
      File "h:\programacao\python\coolbot\venv\lib\site-packages\setuptools\__init__.py", line 139, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "h:\programacao\python\coolbot\venv\lib\site-packages\setuptools\dist.py", line 716, in fetch_build_eggs
        resolved_dists = pkg_resources.working_set.resolve(
      File "h:\programacao\python\coolbot\venv\lib\site-packages\pkg_resources\__init__.py", line 780, in resolve
        dist = best[req.key] = env.best_match(
      File "h:\programacao\python\coolbot\venv\lib\site-packages\pkg_resources\__init__.py", line 1065, in best_match
        return self.obtain(req, installer)
      File "h:\programacao\python\coolbot\venv\lib\site-packages\pkg_resources\__init__.py", line 1077, in obtain
        return installer(requirement)
      File "h:\programacao\python\coolbot\venv\lib\site-packages\setuptools\dist.py", line 786, in fetch_build_egg
        return cmd.easy_install(req)
      File "h:\programacao\python\coolbot\venv\lib\site-packages\setuptools\command\easy_install.py", line 679, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "h:\programacao\python\coolbot\venv\lib\site-packages\setuptools\command\easy_install.py", line 705, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "h:\programacao\python\coolbot\venv\lib\site-packages\setuptools\command\easy_install.py", line 890, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "h:\programacao\python\coolbot\venv\lib\site-packages\setuptools\command\easy_install.py", line 1158, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "h:\programacao\python\coolbot\venv\lib\site-packages\setuptools\command\easy_install.py", line 1144, in run_setup
        run_setup(setup_script, args)
      File "h:\programacao\python\coolbot\venv\lib\site-packages\setuptools\sandbox.py", line 233, in run_setup
        with setup_context(setup_dir):
      File "C:\Program Files\Python38\lib\contextlib.py", line 113, in __enter__
        return next(self.gen)
      File "h:\programacao\python\coolbot\venv\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
        yield
      File "C:\Program Files\Python38\lib\contextlib.py", line 131, in __exit__
        self.gen.throw(type, value, traceback)
      File "h:\programacao\python\coolbot\venv\lib\site-packages\setuptools\sandbox.py", line 166, in save_modules
        saved_exc.resume()
      File "h:\programacao\python\coolbot\venv\lib\site-packages\setuptools\sandbox.py", line 141, in resume
        six.reraise(type, exc, self._tb)
      File "h:\programacao\python\coolbot\venv\lib\site-packages\setuptools\_vendor\six.py", line 685, in reraise
        raise value.with_traceback(tb)
      File "h:\programacao\python\coolbot\venv\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
        yield saved
      File "h:\programacao\python\coolbot\venv\lib\site-packages\setuptools\sandbox.py", line 194, in setup_context
        __import__('setuptools')
      File "C:\Users\MSIGX6~1\AppData\Local\Temp\easy_install-xy422xbf\distribute-0.7.3\setuptools\__init__.py", line 2, in <module>
      File "C:\Users\MSIGX6~1\AppData\Local\Temp\easy_install-xy422xbf\distribute-0.7.3\setuptools\extension.py", line 5, in <module>
      File "C:\Users\MSIGX6~1\AppData\Local\Temp\easy_install-xy422xbf\distribute-0.7.3\setuptools\dist.py", line 7, in <module>
      File "C:\Users\MSIGX6~1\AppData\Local\Temp\easy_install-xy422xbf\distribute-0.7.3\setuptools\command\__init__.py", line 8, in <module>
      File "C:\Users\MSIGX6~1\AppData\Local\Temp\easy_install-xy422xbf\distribute-0.7.3\setuptools\command\install_scripts.py", line 3, in <module>
      File "C:\Users\MSIGX6~1\AppData\Local\Temp\easy_install-xy422xbf\distribute-0.7.3\pkg_resources.py", line 1518, in <module>
    AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'

Error in Python 3

ERROR: Command errored out with exit status 1:
 command: /opt/virtualenvs/python3/bin/python3 -c 'import sys, setupto

ols, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-93oq0tm_/dotenv/setup.p
y'"'"'; file='"'"'/tmp/pip-install-93oq0tm_/dotenv/setup.py'"'"';f=get
attr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'
\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'
"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-6coih9jp
cwd: /tmp/pip-install-93oq0tm_/dotenv/
Complete output (51 lines):
ERROR: Command errored out with exit status 1:
command: /opt/virtualenvs/python3/bin/python3 -c 'import sys, set
uptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-igbsd_sp/distribute/s
etup.py'"'"'; file='"'"'/tmp/pip-wheel-igbsd_sp/distribute/setup.py'"'
"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().repla
ce('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"
'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-0u99wf9x
cwd: /tmp/pip-wheel-igbsd_sp/distribute/
Complete output (15 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-wheel-igbsd_sp/distribute/setuptools/init.py"
, line 2, in
from setuptools.extension import Extension, Library
File "/tmp/pip-wheel-igbsd_sp/distribute/setuptools/extension.py", line 5, in
from setuptools.dist import _get_unpatched
File "/tmp/pip-wheel-igbsd_sp/distribute/setuptools/dist.py", line 7, in
from setuptools.command.install import install
File "/tmp/pip-wheel-igbsd_sp/distribute/setuptools/command/init.py", line 8, in
from setuptools.command import install_scripts
File "/tmp/pip-wheel-igbsd_sp/distribute/setuptools/command/install_scripts.py", line 3, in
from pkg_resources import Distribution, PathMetadata, ensure_directory
File "/tmp/pip-wheel-igbsd_sp/distribute/pkg_resources.py", line 1518, in
register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
subprocess.check_call(cmd)
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/virtualenvs/python3/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpf9yy1f6o', '--quiet', 'distribute']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-93oq0tm_/dotenv/setup.py", line 13, in <module>
    setup(name='dotenv',
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/setuptools/__init__.py", line 160, in setup
    _install_setup_requires(attrs)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/setuptools/__init__.py", line 155, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/setuptools/dist.py", line 695, in fetch_build_eggs
    resolved_dists = pkg_resources.working_set.resolve(
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pkg_resources/__init__.py", line 780, in resolve
    dist = best[req.key] = env.best_match(
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1065, in best_match
    return self.obtain(req, installer)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1077, in obtain
    return installer(requirement)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/setuptools/dist.py", line 754, in fetch_build_egg
    return fetch_build_egg(self, req)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/setuptools/installer.py", line 130, in fetch_build_egg
    raise DistutilsError(str(e))
distutils.errors.DistutilsError: Command '['/opt/virtualenvs/python3/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpf9yy1f6o', '--quiet', 'distribute']' returned non-zero exit status 1.
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

cannot import name 'Dotenv' from 'dotenv' (python3)

Running Python 3.8.8

Correctly installed the module

python-dotenv==0.19.2

Following the instruction stated on the README.MD

from dotenv import Dotenv

I got this error message:

Exception has occurred: ImportError cannot import name 'Dotenv' from 'dotenv'

Apparently there are some workarounds going on already, but I feel like at least the docs needs to be tested or updated.

Enable `#` comments

Should commenting be enabled, by ignoring any lines starting with #?
That would be convenient for putting env file explanations within the file.

Please remove from pypip

If you're not going to maintain this, please remove it from distribution. It's wasting people's time should they inadvertently put this library into their dependencies instead of python-dotenv.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.