justpy
justpy copied to clipboard
demjeson install cannot be done since setuptools upgrade, so neither justpy can.
Today on a new deploy I did :
pip3 install justpy
but ends up failing because:
ERROR: Cannot install justpy==0.0.5, justpy==0.0.6, justpy==0.0.7, justpy==0.0.8, justpy==0.0.9, justpy==0.1.0, justpy==0.1.1, justpy==0.1.2, justpy==0.1.3, justpy==0.1.4 and justpy==0.1.5 because these package versions have conflicting dependencies.
The conflict is caused by:
justpy 0.1.5 depends on demjson>=2.2.4
justpy 0.1.4 depends on demjson>=2.2.4
justpy 0.1.3 depends on demjson>=2.2.4
justpy 0.1.2 depends on demjson>=2.2.4
justpy 0.1.1 depends on demjson>=2.2.4
justpy 0.1.0 depends on demjson>=2.2.4
justpy 0.0.9 depends on demjson>=2.2.4
justpy 0.0.8 depends on demjson>=2.2.4
justpy 0.0.7 depends on demjson>=2.2.4
justpy 0.0.6 depends on demjson>=2.2.4
justpy 0.0.5 depends on demjson>=2.2.4
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
it is an open issue at demjson repo:
https://github.com/dmeranda/demjson/issues/40
Downgrading to setuptools 57.5.0 it des not work, it installs but while doing:
import justpy
gives:
import justpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/data/giodegas/dev/AQ2009/myenv/lib/python3.8/site-packages/justpy/__init__.py", line 1, in <module>
from .justpy import *
File "/data/giodegas/dev/AQ2009/myenv/lib/python3.8/site-packages/justpy/justpy.py", line 13, in <module>
from .chartcomponents import *
File "/data/giodegas/dev/AQ2009/myenv/lib/python3.8/site-packages/justpy/chartcomponents.py", line 2, in <module>
import demjson
File "/data/giodegas/dev/AQ2009/temp/demjson/demjson.py", line 645
class json_int( (1L).__class__ ): # Have to specify base this way to satisfy 2to3
^
SyntaxError: invalid syntax
@elimintz what can I do now? Thank you for your support.
Thanks for alerting me to this. I'll try to figure something out. In the meantime, it seems that if you downgrade to anything less than python 3.10 and setuptools to 57.5.0 it should work. Let me know if it doesn't
I am using python 3.8.10 now, setuptools 57.5.0 with a virtual env, still with the import problem. I may try downgrading setuptools more.
Ok, please let me know how it goes
ok found setuptools 56.0.0 is OK!
this is now my pipi listi in the virtual environment:
pip list
Package Version
------------------ ---------
addict 2.4.0
aiofiles 0.7.0
anyio 3.3.0
asgiref 3.4.1
certifi 2021.5.30
charset-normalizer 2.0.4
click 8.0.1
demjson 2.2.4
h11 0.12.0
httpcore 0.13.6
httpx 0.19.0
idna 3.2
itsdangerous 2.0.1
Jinja2 3.0.1
justpy 0.1.5
MarkupSafe 2.0.1
pip 21.2.4
pkg_resources 0.0.0
rfc3986 1.5.0
setuptools 56.0.0
sniffio 1.2.0
starlette 0.16.0
uvicorn 0.15.0
websockets 9.1
Thanks for finding a workaround. I am now in the process of publishing a new version without using setuptools (using flit). Perhaps this will solve the issue.
btw, using docker and latest python3:8 image I found this better setuptools 57.4.0:
pip list
Package Version
------------------ ---------
addict 2.4.0
aiofiles 0.7.0
anyio 3.3.0
asgiref 3.4.1
certifi 2021.5.30
charset-normalizer 2.0.4
click 8.0.1
demjson 2.2.4
h11 0.12.0
httpcore 0.13.6
httpx 0.19.0
idna 3.2
itsdangerous 2.0.1
Jinja2 3.0.1
justpy 0.1.5
MarkupSafe 2.0.1
pip 21.2.4
rfc3986 1.5.0
setuptools 57.4.0
sniffio 1.2.0
starlette 0.16.0
uvicorn 0.15.0
websockets 9.1
wheel 0.37.0
You might want to switch to demjson3 in case you really only want to support Python 3 anymore.
Thank you for the suggestion. I will make the change.
I have the same problem but am unable to downgrade to Python <3.8.8 because I'm on a Mac with an M1 chip.
I have the same issue. My docker build fails since a few days, because demjson doesn't build using the current setuptools version.
Hi,
Is there any solution yet for this problem? JustPy isn't just getting installed!
Please see if you can port things to demjson3.
Thanks, Sam
I need to find time to release a new version with this. There is a demjson compatible package called demjson3 that solves this issue. If you want to fix it locally, change all import demjson lines to import demjson3 as demjson
And you need to install demjson3.
The advantage of using demjson is that it can parse correctly javascript objects where the keys do not need to be between quotes.
same problem here on python 3.6.9 downgrading setuptools to 56.0.0 as giodegas stated worked for me.
@elimintz Replacing demjson with demjson3 indeed fixes the issue for me. Also see PR.
Version 0.2.3 is out that should this problem. Replaced demjson with demjson3. Would appreciate confirmation that this indeed is the case. Did not have time for too much testing but the changes were very limited. @poke1024 @1081 @nielstron @giodegas @Ledjob @docsteveharris @Flova
Some preliminary test show it is ok now. Thank you.
It works fine for me too
duplicate of #408