justpy: 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.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 18

Most upvoted comments

You might want to switch to demjson3 in case you really only want to support Python 3 anymore.

It works fine for me too

Some preliminary test show it is ok now. Thank you.

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

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.