I am trying to import tulip in Python on Win10, using VS Code, but I am getting an error.
I have installed the module using 'pip install tulip-python'
Then I added the <tulip_install_dir>/lib/tulip/python</tulip_install_dir> path in Path in the System Environment Properties
When I try to run:
import tulip
I get the following error:
File "C:.....\Tulip=5.4.0\lib\tulip\python\tulip\init.py", line 33, in <module>
import _tulip # noqa
ImportError: DLL load failed: The specified module could not be found.</module>
Could you please help?
PS: I have tried both Python 2.7.18 and Python 3.7.1 versions, both 64-bits
I just read on another topic, that python 2.7 needs to be 32 bit.
I just tried using python 2.7.18 32-bit, and I get the following message:
File "C:.....\Tulip=5.4.0\lib\tulip\python\tulip\init.py", line 33, in <module>
import _tulip # noqa
ImportError: DLL load failed: %1 is not a valid Win32 application.</module>
I have Tulip version 5.4.0, which says that has the addition of the Python 3.8 support, so it should be fine with python 3 as well..
Thank you,
Elektra
Last edit: Elektra Kypridemou 2020-09-02
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
thank you so much for your reply! This explains a lot!
Actually, what I ended up doing was uninstalling the Tulip software from my computer. This made the tulip-python package be successfully imported in Python. So if I want to install the software again, will I have to remove the paths from my environment variables, in order to keep the python module working?
Also, I had to set up a virtual environment and install the tulip-python module only there. I avoid installing the tulip-python module in my basic pip environment, because otherwise it seems to have some conflicts with some other modules I am using, like matplotlib, scipy and numpy. So after installing the tulip-python, I had problems importing the above packages. My temporary solution was running the tulip-related part of the code in the virtual environment, but it would be better if I could run the whole code in the same environment. Do you have any tips for fixing this?
Thank you very much for your support,
Elektra
Last edit: Elektra Kypridemou 2020-09-09
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I am trying to import tulip in Python on Win10, using VS Code, but I am getting an error.
I have installed the module using 'pip install tulip-python'
Then I added the <tulip_install_dir>/lib/tulip/python</tulip_install_dir> path in Path in the System Environment Properties
When I try to run:
import tulip
I get the following error:
File "C:.....\Tulip=5.4.0\lib\tulip\python\tulip\init.py", line 33, in <module>
import _tulip # noqa
ImportError: DLL load failed: The specified module could not be found.</module>
Could you please help?
PS: I have tried both Python 2.7.18 and Python 3.7.1 versions, both 64-bits
Last edit: Elektra Kypridemou 2020-09-02
Hello again,
I just read on another topic, that python 2.7 needs to be 32 bit.
I just tried using python 2.7.18 32-bit, and I get the following message:
File "C:.....\Tulip=5.4.0\lib\tulip\python\tulip\init.py", line 33, in <module>
import _tulip # noqa
ImportError: DLL load failed: %1 is not a valid Win32 application.</module>
I have Tulip version 5.4.0, which says that has the addition of the Python 3.8 support, so it should be fine with python 3 as well..
Thank you,
Elektra
Last edit: Elektra Kypridemou 2020-09-02
It seems that you mixed the use of the tulip-python package through the Python packaging Index (installation through pip), and the use of the tulip-python package provided through the Tulip software installation.
If you just want to use the tulip-python package installed with pip you have no need to setup the the PATH variable.
See https://tulip.labri.fr/Documentation/current/tulip-python/html/gettingstarted.html#installing-the-tulip-python-modules-from-the-python-packaging-index
for more details.
Hope this helps.
Dear Patrick,
thank you so much for your reply! This explains a lot!
Actually, what I ended up doing was uninstalling the Tulip software from my computer. This made the tulip-python package be successfully imported in Python. So if I want to install the software again, will I have to remove the paths from my environment variables, in order to keep the python module working?
Also, I had to set up a virtual environment and install the tulip-python module only there. I avoid installing the tulip-python module in my basic pip environment, because otherwise it seems to have some conflicts with some other modules I am using, like matplotlib, scipy and numpy. So after installing the tulip-python, I had problems importing the above packages. My temporary solution was running the tulip-related part of the code in the virtual environment, but it would be better if I could run the whole code in the same environment. Do you have any tips for fixing this?
Thank you very much for your support,
Elektra
Last edit: Elektra Kypridemou 2020-09-09