1

Problem

I have two conda virtual environments. One can run uvicorn commands such as uvicorn main:app --reload to run the example code from the FastAPI tutorial, but the other environment returns Access is denied. for each uvicorn command.

What I have tried

The second (not working one) has the exact same versions of uvicorn, fastapi, and python installed and I'm using the same anaconda prompt. Hence it's not a problem of access rights on the underlying folder or admin rights, because in that case both environments should not work in the same prompts (right?).

I'm looking for a difference in both environments, but given that only fastapi and uvicorn are required to run Fast API code, I'm not sure what to try next.

Question

Are there additional requirements for running a FastAPI app, beyond the fastapi and uvicorn packages that could cause this problem and/or are there perhaps other matters I should look into?

Tim J
  • 545
  • 2
  • 16
  • 1
    Do you have the full error message? If the port is in use / reserved, you might get an access denied error message - are you sure the port that uvicorn tries to use is actually available? https://stackoverflow.com/questions/48478869/cannot-bind-to-some-ports-due-to-permission-denied – MatsLindh Jan 03 '23 at 11:08
  • The full error message is: 'Acces is denied.' There is no more info. Also I don't suspect it's a port-related issue given that it works with the same command in the same prompt for the other venv. – Tim J Jan 03 '23 at 12:10

0 Answers0