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

ModuleNotFoundError: No module named 'fastapi_crudrouter' #92

Closed
arkryonia opened this issue Sep 8, 2021 · 8 comments
Closed

ModuleNotFoundError: No module named 'fastapi_crudrouter' #92

arkryonia opened this issue Sep 8, 2021 · 8 comments

Comments

@arkryonia
Copy link

arkryonia commented Sep 8, 2021

Hello.

I'm trying fastapi-crudrouter. Unfortunetly, I'm experiencing an unrecognized issue:

ModuleNotFoundError: No module named 'fastapi_crudrouter'

I have virtualenv with fastapi-crudrouter installed

rom pydantic import  BaseModel
from fastapi import FastAPI
from fastapi_crudrouter import MemoryCRUDRouter as CRUDRouter


class Potato(BaseModel):
    id: int
    color: str
    mass: float

app = FastAPI()

app.include_router(CRUDRouter(schema=Potato))

requiremnts.txt

fastapi==0.68.1
fastapi-crudrouter==0.8.1
pydantic==1.8.2
starlette==0.14.2
typing-extensions==3.10.0.2
@rgreen32
Copy link

rgreen32 commented Sep 8, 2021

@arkryonia Are you running it with your virtualenv activated? Does fastapi-crudrouter show up when you type pip freeze ?

@arkryonia
Copy link
Author

Yes my virtualenv is activated.

@awtkns
Copy link
Owner

awtkns commented Sep 12, 2021

@archydeberker what version of python / os are you running? (edit: @arkryonia)

@archydeberker
Copy link
Contributor

@archydeberker what version of python / os are you running?

Bad tag I think @awtkns

@awtkns
Copy link
Owner

awtkns commented Sep 12, 2021

Bad tag I think @awtkns

Sorry about that! Very similar names.

@arkryonia
Copy link
Author

@archydeberker what version of python / os are you running? (edit: @arkryonia)

python 3.9
Debian Bulleyse

@awtkns
Copy link
Owner

awtkns commented Sep 14, 2021

FROM debian:bullseye

RUN apt-get update && apt-get install python3 python3-pip -y
COPY requirements.txt requirements.txt

RUN pip install -r requirements.txt
COPY main.py main.py

CMD [ "python3", "./main.py" ]

The docker file above works to install and run the code / environment you gave on debian:bullseye.

@awtkns awtkns closed this as completed Sep 14, 2021
@arkryonia
Copy link
Author

Ok. I got you. Let me try.

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

4 participants