Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fastapi configuration [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
YuriyRusinov
Apprentice
Apprentice


Joined: 21 Jul 2004
Posts: 213
Location: Saint-Petersburg, Russia

PostPosted: Sun Aug 11, 2024 2:59 pm    Post subject: Fastapi configuration [SOLVED] Reply with quote

Hello colleagues!

I have emerged package dev-python/fastapi from pentoo overlay. Which way I can launch it? In Ubuntu Linux, I call
Code:

$fastapi dev example.py

and it works. But there when I do it, I have got an error
Quote:

bash: fastapi: command not found

emerge -pv dev-python/fastapi gives
Code:


Local copy of remote index is up-to-date and will be used.

Local copy of remote index is up-to-date and will be used.

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 3.02 s (backtrack: 0/20).

[ebuild   R    ] dev-python/fastapi-0.109.2::pentoo  USE="-all" PYTHON_TARGETS="python3_11 -python3_10 -python3_12" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

_________________
Best regards,
Yuriy Rusinov.


Last edited by YuriyRusinov on Sun Aug 18, 2024 7:37 pm; edited 1 time in total
Back to top
View user's profile Send private message
Banana
Moderator
Moderator


Joined: 21 May 2004
Posts: 1798
Location: Germany

PostPosted: Sun Aug 11, 2024 4:56 pm    Post subject: Reply with quote

hmm. I do not see any special useflag and it sounds like this package installs not the cli command: https://fastapi.tiangolo.com/fastapi-cli/
What happens if you activate the all useflag?
_________________
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Back to top
View user's profile Send private message
YuriyRusinov
Apprentice
Apprentice


Joined: 21 Jul 2004
Posts: 213
Location: Saint-Petersburg, Russia

PostPosted: Sun Aug 11, 2024 5:47 pm    Post subject: Reply with quote

Some python packages were installed, but same result.
_________________
Best regards,
Yuriy Rusinov.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20521

PostPosted: Sun Aug 11, 2024 10:30 pm    Post subject: Reply with quote

Maybe the executable is installed as something else or not in your path.

What is the output of:
Code:
grep bin /var/db/pkg/app-portage/dev-python/fastapi-0.109.2/CONTENTS
"grep bin" presumes that it will be installed into either /bin or /usr/bin.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
YuriyRusinov
Apprentice
Apprentice


Joined: 21 Jul 2004
Posts: 213
Location: Saint-Petersburg, Russia

PostPosted: Mon Aug 12, 2024 4:37 am    Post subject: Reply with quote

empty output.
_________________
Best regards,
Yuriy Rusinov.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20521

PostPosted: Mon Aug 12, 2024 9:17 pm    Post subject: Reply with quote

I'd test but it wants to install 26 other packages.

If you have portage-tools installed, you can use wgetpaste to post the output of "qlist fastapi", which lists everything the package installed.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
YuriyRusinov
Apprentice
Apprentice


Joined: 21 Jul 2004
Posts: 213
Location: Saint-Petersburg, Russia

PostPosted: Tue Aug 13, 2024 7:32 am    Post subject: Reply with quote

My output of qlist fastapi is
Quote:

/usr/lib/python3.11/site-packages/fastapi-0.109.2.dist-info/METADATA
/usr/lib/python3.11/site-packages/fastapi-0.109.2.dist-info/WHEEL
/usr/lib/python3.11/site-packages/fastapi/py.typed
/usr/lib/python3.11/site-packages/fastapi/params.py
/usr/lib/python3.11/site-packages/fastapi/staticfiles.py
/usr/lib/python3.11/site-packages/fastapi/openapi/models.py
/usr/lib/python3.11/site-packages/fastapi/openapi/docs.py
/usr/lib/python3.11/site-packages/fastapi/openapi/utils.py
/usr/lib/python3.11/site-packages/fastapi/openapi/__pycache__/models.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/openapi/__pycache__/docs.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/openapi/__pycache__/__init__.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/openapi/__pycache__/utils.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/openapi/__pycache__/docs.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/openapi/__pycache__/models.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/openapi/__pycache__/__init__.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/openapi/__pycache__/utils.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/openapi/__pycache__/constants.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/openapi/__pycache__/__init__.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/openapi/__pycache__/utils.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/openapi/__pycache__/constants.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/openapi/__pycache__/models.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/openapi/__pycache__/constants.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/openapi/__pycache__/docs.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/openapi/constants.py
/usr/lib/python3.11/site-packages/fastapi/openapi/__init__.py
/usr/lib/python3.11/site-packages/fastapi/applications.py
/usr/lib/python3.11/site-packages/fastapi/_compat.py
/usr/lib/python3.11/site-packages/fastapi/testclient.py
/usr/lib/python3.11/site-packages/fastapi/background.py
/usr/lib/python3.11/site-packages/fastapi/param_functions.py
/usr/lib/python3.11/site-packages/fastapi/security/http.py
/usr/lib/python3.11/site-packages/fastapi/security/base.py
/usr/lib/python3.11/site-packages/fastapi/security/api_key.py
/usr/lib/python3.11/site-packages/fastapi/security/utils.py
/usr/lib/python3.11/site-packages/fastapi/security/__pycache__/base.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/security/__pycache__/oauth2.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/security/__pycache__/base.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/security/__pycache__/oauth2.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/security/__pycache__/__init__.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/security/__pycache__/utils.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/security/__pycache__/api_key.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/security/__pycache__/__init__.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/security/__pycache__/open_id_connect_url.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/security/__pycache__/api_key.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/security/__pycache__/utils.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/security/__pycache__/oauth2.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/security/__pycache__/__init__.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/security/__pycache__/http.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/security/__pycache__/utils.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/security/__pycache__/open_id_connect_url.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/security/__pycache__/http.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/security/__pycache__/base.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/security/__pycache__/http.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/security/__pycache__/api_key.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/security/__pycache__/open_id_connect_url.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/security/__init__.py
/usr/lib/python3.11/site-packages/fastapi/security/open_id_connect_url.py
/usr/lib/python3.11/site-packages/fastapi/security/oauth2.py
/usr/lib/python3.11/site-packages/fastapi/dependencies/models.py
/usr/lib/python3.11/site-packages/fastapi/dependencies/utils.py
/usr/lib/python3.11/site-packages/fastapi/dependencies/__pycache__/models.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/dependencies/__pycache__/__init__.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/dependencies/__pycache__/utils.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/dependencies/__pycache__/models.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/dependencies/__pycache__/__init__.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/dependencies/__pycache__/utils.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/dependencies/__pycache__/__init__.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/dependencies/__pycache__/utils.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/dependencies/__pycache__/models.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/dependencies/__init__.py
/usr/lib/python3.11/site-packages/fastapi/requests.py
/usr/lib/python3.11/site-packages/fastapi/templating.py
/usr/lib/python3.11/site-packages/fastapi/middleware/cors.py
/usr/lib/python3.11/site-packages/fastapi/middleware/wsgi.py
/usr/lib/python3.11/site-packages/fastapi/middleware/gzip.py
/usr/lib/python3.11/site-packages/fastapi/middleware/__pycache__/trustedhost.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/middleware/__pycache__/gzip.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/middleware/__pycache__/__init__.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/middleware/__pycache__/gzip.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/middleware/__pycache__/gzip.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/middleware/__pycache__/__init__.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/middleware/__pycache__/wsgi.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/middleware/__pycache__/cors.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/middleware/__pycache__/httpsredirect.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/middleware/__pycache__/__init__.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/middleware/__pycache__/cors.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/middleware/__pycache__/httpsredirect.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/middleware/__pycache__/wsgi.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/middleware/__pycache__/wsgi.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/middleware/__pycache__/trustedhost.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/middleware/__pycache__/cors.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/middleware/__pycache__/httpsredirect.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/middleware/__pycache__/trustedhost.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/middleware/__init__.py
/usr/lib/python3.11/site-packages/fastapi/middleware/httpsredirect.py
/usr/lib/python3.11/site-packages/fastapi/middleware/trustedhost.py
/usr/lib/python3.11/site-packages/fastapi/websockets.py
/usr/lib/python3.11/site-packages/fastapi/utils.py
/usr/lib/python3.11/site-packages/fastapi/encoders.py
/usr/lib/python3.11/site-packages/fastapi/__pycache__/requests.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/testclient.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/exception_handlers.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/concurrency.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/exceptions.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/staticfiles.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/concurrency.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/responses.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/__init__.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/websockets.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/applications.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/routing.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/utils.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/requests.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/templating.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/concurrency.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/types.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/__init__.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/param_functions.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/applications.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/exception_handlers.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/staticfiles.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/background.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/routing.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/utils.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/encoders.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/param_functions.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/testclient.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/params.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/encoders.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/params.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/testclient.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/types.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/logger.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/datastructures.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/datastructures.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/params.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/__init__.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/exceptions.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/staticfiles.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/applications.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/utils.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/templating.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/background.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/_compat.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/_compat.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/background.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/responses.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/encoders.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/logger.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/logger.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/_compat.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/exception_handlers.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/exceptions.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/datastructures.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/requests.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/websockets.cpython-311.opt-1.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/templating.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/websockets.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/param_functions.cpython-311.opt-2.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/routing.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/responses.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/__pycache__/types.cpython-311.pyc
/usr/lib/python3.11/site-packages/fastapi/exception_handlers.py
/usr/lib/python3.11/site-packages/fastapi/concurrency.py
/usr/lib/python3.11/site-packages/fastapi/__init__.py
/usr/lib/python3.11/site-packages/fastapi/routing.py
/usr/lib/python3.11/site-packages/fastapi/responses.py
/usr/lib/python3.11/site-packages/fastapi/datastructures.py
/usr/lib/python3.11/site-packages/fastapi/exceptions.py
/usr/lib/python3.11/site-packages/fastapi/types.py
/usr/lib/python3.11/site-packages/fastapi/logger.py
/usr/share/doc/fastapi-0.109.2/README.md.bz2

No binary
_________________
Best regards,
Yuriy Rusinov.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20521

PostPosted: Tue Aug 13, 2024 3:23 pm    Post subject: Reply with quote

Well, that's beyond my understanding of python. With that output and Banana's find regarding fastapi-cli, it might be worth checking with the pentoo folks.

According to the repo information, their website is https://www.pentoo.ch/
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
halcon
l33t
l33t


Joined: 15 Dec 2019
Posts: 649

PostPosted: Wed Aug 14, 2024 10:29 am    Post subject: Reply with quote

YuriyRusinov,

As I see, you installed fastapi version 109.2.

According to the docs, that version should be launched not with fastapi dev command, bit with uvicorn main:app. This is also why there is no fastapi-cli package.

Has uvicorn been installed as a dependency for fastapi-109.2?
_________________
A wife asks her husband, a programmer:
- Could you please go shopping for me and buy one carton of milk, and if they have eggs, get 6?
He comes back with 6 cartons of milk.
- Why did you buy 6 cartons of milk?
- They had eggs.
Back to top
View user's profile Send private message
YuriyRusinov
Apprentice
Apprentice


Joined: 21 Jul 2004
Posts: 213
Location: Saint-Petersburg, Russia

PostPosted: Sun Aug 18, 2024 7:36 pm    Post subject: Reply with quote

Problem was solved by uvicorn main:app
_________________
Best regards,
Yuriy Rusinov.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum