Robyn
Robyn copied to clipboard
not working on mac/windows
i tried on all 3 platforms with/without venv. only seems to work on linux.
mac error:
...robyntest/venv/lib/python3.10/site-packages/robyn/init.py", line 9, in
one difference i noticed is the linux one has a .so file where the mac does not. neither does the windows but that error is
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\pickle.py", line 578, in save rv = reduce(self.proto) TypeError: cannot pickle 'builtins.SocketHeld' object
.........testrobyn>Traceback (most recent call last):
File "
Hi @byteface ,
Thank you for reporting the errors and apologies for the late response. Windows error is evident and I will fix try to fix this in the latest release.
However, it is installing fine on my mac.
Can you list your python version, pip version and osx version?
Sure, python 3.10 with latest pip. (Just tried with upgraded pip. still no luck)
tbf it's a 18mnth old mac on catalina.(2 versions back) but that OS is still under 13 months since it was officially replaced.
@byteface , is your mac an intel mac or an apple silicon mac?
@byteface , I was able to replicate your issue. You can fix the mac issue by upgrading your pip in your venv.
I think the wheel file it's downloading on mac doesn't have the prebuild rust binaries it should.
@myers , I think I've made a change in the latest versions(not released yet.)
Can you please try pip install setuptools wheel and then do pip install robyn ?
I just want to check if it works that way.
pip was already latest.
installing latest robyn still missing the binaries even with setuptools/wheel.
❯ pip install -U setuptools wheel
Requirement already satisfied: setuptools in /Users/myers/.pyenv/versions/3.10.1/lib/python3.10/site-packages (58.1.0)
Collecting setuptools
Downloading setuptools-60.5.0-py3-none-any.whl (958 kB)
|████████████████████████████████| 958 kB 2.5 MB/s
Requirement already satisfied: wheel in /Users/myers/.pyenv/versions/3.10.1/lib/python3.10/site-packages (0.37.1)
Installing collected packages: setuptools
Attempting uninstall: setuptools
Found existing installation: setuptools 58.1.0
Uninstalling setuptools-58.1.0:
Successfully uninstalled setuptools-58.1.0
Successfully installed setuptools-60.5.0
❯ pip uninstall robyn
Found existing installation: robyn 0.11.1
Uninstalling robyn-0.11.1:
Would remove:
/Users/myers/.pyenv/versions/3.10.1/lib/python3.10/site-packages/robyn-0.11.1.dist-info/*
/Users/myers/.pyenv/versions/3.10.1/lib/python3.10/site-packages/robyn/*
Proceed (Y/n)? y
Successfully uninstalled robyn-0.11.1
then I tried to install robyn but same thing and it said it was using a cached wheel. I found that *whl file and deleted and did this:
❯ pip install -U robyn
Collecting robyn
Downloading robyn-0.11.1-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (3.7 MB)
|████████████████████████████████| 3.7 MB 1.8 MB/s
Collecting uvloop==0.16.0
Downloading uvloop-0.16.0-cp39-cp39-macosx_10_9_x86_64.whl (1.5 MB)
|████████████████████████████████| 1.5 MB 3.1 MB/s
Collecting multiprocess==0.70.12.2
Downloading multiprocess-0.70.12.2-py39-none-any.whl (128 kB)
|████████████████████████████████| 128 kB 3.5 MB/s
Collecting watchdog==2.1.3
Downloading watchdog-2.1.3-cp39-cp39-macosx_10_9_x86_64.whl (84 kB)
|████████████████████████████████| 84 kB 3.4 MB/s
Collecting dill>=0.3.4
Downloading dill-0.3.4-py2.py3-none-any.whl (86 kB)
|████████████████████████████████| 86 kB 3.9 MB/s
Installing collected packages: dill, watchdog, uvloop, multiprocess, robyn
Successfully installed dill-0.3.4 multiprocess-0.70.12.2 robyn-0.11.1 uvloop-0.16.0 watchdog-2.1.3
WARNING: You are using pip version 21.0.1; however, version 21.3.1 is available.
You should consider upgrading via the '/Users/myers/.pyenv/versions/3.9.2/bin/python3.9 -m pip install --upgrade pip' command.
I tried to run a simple server, no luck
❯ python3 server.py
Traceback (most recent call last):
File "/Users/myers/p/exp/robyn_test/server.py", line 1, in <module>
from robyn import Robyn
File "/Users/myers/.pyenv/versions/3.10.1/lib/python3.10/site-packages/robyn/__init__.py", line 8, in <module>
from .robyn import Server, SocketHeld
ModuleNotFoundError: No module named 'robyn.robyn'
Upgraded pip as it suggested and then reinstalled robyn
❯ pip install -U robyn
Collecting robyn
Using cached robyn-0.11.1.tar.gz (72 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: watchdog<3.0.0,>=2.1.3 in /Users/myers/.pyenv/versions/3.10.1/lib/python3.10/site-packages (from robyn) (2.1.6)
Building wheels for collected packages: robyn
Building wheel for robyn (pyproject.toml) ... done
Created wheel for robyn: filename=robyn-0.11.1-py3-none-any.whl size=7414 sha256=99a82c0490ba5311eb6c54b090f76adf7643a050bbfa62f1ed59ce8ee9d95278
Stored in directory: /Users/myers/Library/Caches/pip/wheels/32/06/fd/f86202b0831e3b21fcfa3f7799f6e389eb029eec537c7c8797
Successfully built robyn
Installing collected packages: robyn
Successfully installed robyn-0.11.1
different but still same error if I try and run example (same error as above)
@myers @byteface , this is very strange. I will be releasing v0.12.0 in a day or two and this should be hopefully fixed then. I have changed the build backend for the latest version.
@myers @byteface , this issue is fixed in (v0.17.3)
https://github.com/sansyrox/robyn/pull/261