Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to install Tixi on Python #165

Closed
mnoeding opened this issue Aug 5, 2020 · 6 comments
Closed

Trying to install Tixi on Python #165

mnoeding opened this issue Aug 5, 2020 · 6 comments

Comments

@mnoeding
Copy link

mnoeding commented Aug 5, 2020

Hello,
I'm trying to install Tixi3 to use it in Python. After Installation i got following error when trying to import tixiwrapper into a python script:

Traceback (most recent call last):
File "C:\Users\noed_mc\Python35\lib\site-packages\tixiwrapper.py", line 174, in Tixi
lib = ctypes.cdll.TIXI
File "C:\Users\noed_mc\Python35\lib\ctypes_init_.py", line 417, in getattr
dll = self.dlltype(name)
File "C:\Users\noed_mc\Python35\lib\ctypes_init
.py", line 347, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] Das angegebene Modul wurde nicht gefunden

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "F:/Datensicherung/Python/t.py", line 1, in
import tixiwrapper
File "C:\Users\noed_mc\Python35\lib\site-packages\tixiwrapper.py", line 165, in
class Tixi(object):
File "C:\Users\noed_mc\Python35\lib\site-packages\tixiwrapper.py", line 182, in Tixi
" 2) The architecture of the library matches the architecture of python (a 32 bit python needs a 32 bit shared library)\n")
Exception: Could not load the TIXI library. Please check if:

  1. The PATH (Windows) / LD_LIBRARY_PATH (Linux) environment variable points to the library
  2. The architecture of the library matches the architecture of python (a 32 bit python needs a 32 bit shared library)

Thank you for your help!

@joergbrech
Copy link
Contributor

Thanks for opening an issue @mnoeding! Could you please provide some more information on how you installed tixi3, that is which command did you enter and which version did you install (you can check with conda list)?

From the stack trace it looks like the library has a different architecture than the python version. This could happen if you have a 32-bit python on your machine but installed tixi3 with a 64-bit anaconda or vice-versa.

@mnoeding
Copy link
Author

mnoeding commented Aug 5, 2020

Thank you for quick response!

I installed Anaconda version 2020.07 (Python 3.8, with 64 bit) and Tixi 3.1.1 with also 64 bit.
First i did installation of Anaconda and then installed Tixi with executable first and then with cmd (conda install -c dlr-sc tixi3).
I hope this is more helpful for you.

Thanks a lot!

@joergbrech
Copy link
Contributor

I don't think we currently have tixi3 packages for python 3.8. Could you please try to install tixi3 together with python 3.7 into a separate conda environment, like so:

conda create -n tixi_env python==3.7 tixi3 -c dlr-sc
conda activate tixi_env

Could you please check if your problem persists in this environment?

@joergbrech
Copy link
Contributor

This issue has been resolved by email. The problem was a too long PATH variable in windows that could not be amended by Anaconda, so that - wrongly - the system python was used.

@vincinu
Copy link

vincinu commented Jul 10, 2024

This issue has been resolved by email. The problem was a too long PATH variable in windows that could not be amended by Anaconda, so that - wrongly - the system python was used.

Hi, I am facing the same issue. I tried the first solution proposed but it did not help. Could you elaborate on the last comment? Thank you.

@joergbrech
Copy link
Contributor

@vincinu, sorry, it's been four years, I don't quite remember the details. Also, sorry for letting you wait two weeks for a reply.

Let's focus on your issue: Could you elaborate a bit? Which operating system are you on? Which TiXI and Python versions are you using and in what IDE/environment are you running TiXI? Note, that we have had some issues with Pycharm #178.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants