aiidateam / aiida-restapi

AiiDA Web API for data queries and workflow management.
https://aiida-restapi.readthedocs.io
MIT License
10 stars 7 forks source link

Missing package errors when starting the REST API service #32

Closed flavianojs closed 2 years ago

flavianojs commented 2 years ago

I installed the aiida-restapi package in a new python virtual environment. Then, I tried to start the REST API with uvicorn aiida_restapi:app command. I got the following error:

ModuleNotFoundError: No module named 'jose'

I installed manually this module with pip install python-jose. The next error was:

ModuleNotFoundError: No module named 'passlib'

which I solved with pip install passlib.

The final error was:

RuntimeError: Form data requires "python-multipart" to be installed.

solved with pip install python-multipart. Then finally it worked.

ltalirz commented 2 years ago

This happens when not installing the auth extra - currently, the auth extra is necessary to run the REST API.

In order to install the REST API in editable mode with the auth extra, use

pip install -e .[auth]
flavianojs commented 2 years ago

Thanks, @ltalirz !