Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing backend dependencies error #472

Open
VrushankiPatel opened this issue Jul 7, 2023 · 12 comments
Open

Installing backend dependencies error #472

VrushankiPatel opened this issue Jul 7, 2023 · 12 comments

Comments

@VrushankiPatel
Copy link

Command: pip install dotenv

`Collecting dotenv
Using cached dotenv-0.0.5.tar.gz (2.4 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... error
error: subprocess-exited-with-error

× pip subprocess to install backend dependencies did not run successfully.
│ exit code: 1
╰─> [31 lines of output]
Collecting distribute
Using cached distribute-0.7.3.zip (145 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error

    Preparing metadata (pyproject.toml) did not run successfully.
    exit code: 1

    [6 lines of output]
    usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: setup.py --help [cmd1 cmd2 ...]
       or: setup.py --help-commands
       or: setup.py cmd --help

    error: invalid command 'dist_info'
    [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.
  [end of output]

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

× pip subprocess to install backend dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.`

@skdishansachin
Copy link

what is the operating system you using?

@VrushankiPatel
Copy link
Author

VrushankiPatel commented Jul 10, 2023 via email

@skdishansachin
Copy link

Try updating your packages
pip install wheel setuptools pip --upgrade

@Zeitocrab
Copy link

Zeitocrab commented Jul 10, 2023

I get a similar error on MacOS (Monterey 12.6.7) Python 3.11.4. pip install wheel setuptools pip --upgrade requirements are all satisfied. I'm not sure if I should be making a new issue or posting here, sorry. I've shortened the error messages in some places with an ellipsis.

error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [83 lines of output]
      /usr/local/lib/python3.11/site-packages/setuptools/__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
    ...

Using pip install --use-pep517:

Preparing metadata (setup.py): started
        Preparing metadata (setup.py): finished with status 'error'
        error: subprocess-exited-with-error
    
        × python setup.py egg_info did not run successfully.
        ...
                from pkg_resources import Distribution, PathMetadata, ensure_directory
              File "/private/var/folders/.../pkg_resources.py", line 1518, in <module>
                register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'

Seems like it could be an issue with setuptools?

@theskumar
Copy link
Owner

@VrushankiPatel The install command for this library is

 pip install python-dotenv

and not

 pip install dotenv

Cheers!

@VrushankiPatel
Copy link
Author

VrushankiPatel commented Jul 10, 2023 via email

@skdishansachin
Copy link

@VrushankiPatel
try pip install git+https://github.com/theskumar/python-dotenv.git#egg=python-dotenv

@VrushankiPatel
Copy link
Author

VrushankiPatel commented Jul 10, 2023 via email

@Shayan925
Copy link

Several things you could try:

  • Downgrade setuptools e.g. pip install "setuptools<58.0.0".
  • Use a virtual environment and install the package again.
  • Try different versions of python.
  • Use pip install python-dotenv --use-deprecated=backtrack-on-build-failures or pip install python-dotenv --use-deprecated=legacy-resolver

@VrushankiPatel
Copy link
Author

VrushankiPatel commented Aug 9, 2023 via email

@RamdasCoundinya0716
Copy link

Here is a thing you can try that worked for me:

  1. Downgrade setuptools using --------> pip install "setuptools<58.0.0"
  2. Now run pip install python-dotenv.

@aj-in
Copy link

aj-in commented Apr 2, 2024

You are using the wrong interpreter go to the bottom right side and try changing the interpreter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants