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
Can Pyston run uvicorn server? #76
Comments
It can run but without the uvicorn main:app
INFO: Started server process [31373]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) |
It looks like this is via pyenv which uses our portable release, and it looks like sometimes our portable release is not fully portable and has issues like this. @undingen knows more but he's on vacation In the mean time, you could try our .deb releases which are built for a specific distro and shouldn't have this sort of issue. This would also let you try our new 2.3 release which includes a number of compatibility improvements which could potentially help with a library like this. |
Sorry for the delay, just came back from holiday. mv /home/emadmokhtar/.pyenv/versions/pyston-2.2/lib/pyston3.8/lib-dynload/../../../lib/librt.so.1 /home/emadmokhtar/.pyenv/versions/pyston-2.2/lib/pyston3.8/lib-dynload/../../../lib/librt.so.1_backup |
Until now we always used our supplied 3rd party shared objects dependencies over the distro supplied ones. But ours are likely older which causes problems. E.g. issue 41: we load a thirdparty distro library compiled against a newer zlib but it's loading our supplied older version which fails. This patch changes the search order to use our supplied .so's only as fallback if the dist ones are not available. This is noticable e.g. running `pyston -c "import sqlite3; print(sqlite3.sqlite_version)"` will output 3.31.1 (on my ubuntu 20.04 system) instead of 3.11.0. Why do we even supply this libraries?: We do have to supply this libraries in case the user does not have the library installed or it's not available in the required major version. E.g. if you use the portable release on latest fedora and ubuntu openssl 1.0.x is not available anymore (it uses 1.1.x) so pip will not work if we don't supply 1.0. Which means in order to have only one release which works on as much distros as possible we need to supply this files but should make sure they are only used as fallback. I verified that this fixes the problems in #41 and #76 on ubuntu, fedora and archlinux. BTW: patchelf v0.10 supplied in ubuntu 20.04 contains a bug which corrupts files when modifying already previously via patchelf modified executables.
I recreated the portable release with the #83 fix applied which fixes your problem - you can download it here: |
Ran on the same issue using pyston portable v.2.3.2 trying to start a FastAPI application via uvicorn:
|
What distro are you using? It seemed to work when I tried it out on ubuntu 20.04 |
@undingen I am using Linux Mint 20.2 |
I seem not not be able to reproduce it using |
I'm building a Web API using FastAPI framework. It used
uvicorn
as a server to run the application. Can Pyston run uvicorn server? I'm not sure because I'm getting this error.The text was updated successfully, but these errors were encountered: