SunnyXu / SBMLDiagrams

MIT License
5 stars 1 forks source link

cannot import package in python 3.12 #88

Open jwkruisselbrink opened 3 weeks ago

jwkruisselbrink commented 3 weeks ago

I am getting the following error message when importing SBMLdiagrams in python versino 3.12. Is this something you could easily fix? The error I get when trying to import is "ImportError: cannot import name 'set_package' from 'importlib.util'".

hsauro commented 3 weeks ago

If you don't get a response from the author, I recommend using the newer package called sbmlnetwork. I'm not sure whether the author will continue to maintain sbmldiagrams. We are therefore switching to using sbmlnetwork instead. This was developed by another developer in the lab who has fixed one of the main issues with sbmldiagrams where the autolayout function wasn't very good. Note that the API has changed a little, and if there is anything missing from the new API I recommend you contact the author at:

@.***

sbmlnetwork can be obtained at

https://github.com/adelhpour/SBMLNetwork

https://pypi.org/project/sbmlnetwork/

The author is releasing a new version this week, which fixes some issues, including an installation issue.

As with sbmldiagrams it is very easy to use:

import sbmlnetwork network = sbmlnetwork.load('path/to/model.xml') network.draw()

Herbert Sauro

On Sun, Aug 25, 2024 at 11:07 AM jwkruisselbrink @.***> wrote:

I am getting the following error message when importing SBMLdiagrams in python versino 3.12. Is this something you could easily fix? The error I get when trying to import is "ImportError: cannot import name 'set_package' from 'importlib.util'".

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/SunnyXu/SBMLDiagrams/issues/88__;!!K-Hz7m0Vt54!hccIi9GBXKKsCP56gTk4fQK-rhiLBx4hj08K6rosbUxb_w9UBVuK4SF5QkRXUpkVjtHm8bylHZjvm7FD17BFM-7eZR3FKw$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AAIBSDQG5P6CPQABB5PVOPLZTIMNXAVCNFSM6AAAAABNCXUE52VHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ4DKNBQGE3DMOA__;!!K-Hz7m0Vt54!hccIi9GBXKKsCP56gTk4fQK-rhiLBx4hj08K6rosbUxb_w9UBVuK4SF5QkRXUpkVjtHm8bylHZjvm7FD17BFM-7wKATt6Q$ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Herbert Sauro, Professor Director: NIH Center for model reproducibility University of Washington, Bioengineering 206-685-2119, www.sys-bio.org, http://reproduciblebiomodels.org/ Mobile: 206-880-8093 @.*** Books: http://books.analogmachine.org/

jwkruisselbrink commented 2 weeks ago

Perfect. I tried sbmlnetwork and it seems to be a good alternative, indeed with a better autolayout.