Cant install dotenv

For some reason when recently repl.it went to new version or something like that. It asked me to reinstall all modules like discord or random. But I have trouble installing dotenv with pip install.

~/AntsCzech-BOT$ 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
  ╰─> [29 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.
~/AntsCzech-BOT$ 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
  ╰─> [29 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.

https://replit.com/@Jakubidlk/AntsCzech-BOT

dotenv no longer works on replit. This is because they no longer allow for the creation of the .env file and refuse to make any better alternative or write a singular line of code to fix infinite amounts of security problems to do with env vars that they introduced by not allowing .env files

2 Likes

Thanks, finally something I understand.
If I get it correctly then, I can install some sort of other env that would work? Do you know any?

1 Like

as far as I know, yes

no, and nobody I know knows one so if you want you can try and find it but I’d say with 90% certainty that it’s not possible sadly

3 Likes

@QwertyQwerty88 can I have the solve please?

2 Likes

I decided not to mark it cause you didn’t answer his other questions when I saw it. Idk, really, it was late I guess.

2 Likes

you must to write
pip install python-dotenv
as a result, the correct library will be installed, which is connected by the command
import dotenv

1 Like

this seems to have worked!

no, it doesn’t :man_facepalming: it installs dot-env but you can’t make a .env file and replit has native support for it’s secrets with os.environ["SECRET_NAME"]

2 Likes

the subject was “Cant install dotenv”
my answer solves the problem
other issues are off topic)

1 Like

what the heck are you going on about. Yes, on the surface, your answer “solves” the problem but the real thing he wants if you dig a single layer back is to access env vars, which is not going to be solved by your answer

2 Likes

No? it’s still about .env. Bigminiboss just didn’t want OP to go through all the work of figuring out how to install dotenv only to find out it won’t work on Replit :woman_shrugging:

2 Likes

Calm down. See the green icon? Problem solved.
Now you know how to set dotenv.
I expected gratitude for expanding your horizons.

@ArthurBochkov you are being rude.

They are saying your Solution solves part of the problem. Except @bigminiboss’s way of solving it goes onto what @Jakubidlk was asking for at the beginning.

So instead of being very rude and not having something nice to say, don’t say it at all » Replit Ask Community Standards. They are trying to further help @Jakubidlk you don’t have to be mean about them helping which wont affect you. If you are worried about them getting a Solution instead of you keeping yours, Replit Ask isn’t supposed to be “gamey” where you try to get solutions, it’s about helping people out.

6 Likes

I’ve been coding in python for 6 years, I already know about this. I will not further argue but I don’t think your sol solves it

3 Likes

Hey all, reminder to keep things civil here. We are all trying to help one another, and sometimes the intended tone of our posts gets confused online. Be mindful of what you say, if it isn’t going to make the forum a better place, then think twice before posting.

5 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.