Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

2K
Views
Cannot run uvicorn command on windows despite installing it and adding in path variables

As the title, I have installed uvicorn using the powershell, and added the environment variable. But whenever I run the command, I get the same error. I know I must be doing something small and stupid, but following every answer on SO tells me the same thing, and I have no leads at all.

env variable error screen

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

I know this is an old question but to anyone still looking for a solution if you're on windows at least.

  • Do pip install uvicorn, then do pip uninstall uvicorn, this will give you the directory location of where uvicorn is installed.
  • Type n to not uninstall, you are just getting the path. Go to the location in your explorer where it was installed, for me, it was in users/AppData/roaming/Python/Python37/site-packages.
  • Copy the "uvicorn" and "uvicorn-X.XX.Xdist-info" folders, then go to users/AppData/roaming/Python/Python37/Scripts and copy the "uvicorn.exe".
  • You are going to paste all three of these items to something like path: "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\Scripts".
  • After this, go back to your terminal and try "uvicorn main:app --reload".

And it should work now.

over 4 years ago · Santiago Trujillo Report

0

Me I've just copied folders:

  • "uvicorn" and "uvicorn-X.XX.Xdist-info" from C:\Users\samue\AppData\Roaming\Python\Python38\site-packages
  • and the file "uvicorn.exe" from C:\Users\samue\AppData\Roaming\Python\Python38\Scripts

to my default python folder: C:\Program Files\Python38\Scripts, and I added the link to the .exe file to the environment variables path. It worked!

over 4 years ago · Santiago Trujillo Report

0

Try do the following

python3 -m uvicorn main:app
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!