Install questions for 3.13

General discussion about TexGen.

Moderators: Martin, Developers

Post Reply
rn_84
Posts: 3
Joined: Thu Aug 31, 2023 10:33 pm

Install questions for 3.13

Post by rn_84 »

Hi there! I'm messaging with some clarifications to help troubleshoot an install where I can run my scripts directly. 

I have tried to install the unbundled version or Texgen 3.13 with some challenges - the GUI will not open so I assume it did not install correctly. (It doesn't detect my python 3.9 install and when I manually provide the appropriate path (I've tried both the exe and to the folder above with scripts etc.) it just doesn't work). I'll note python 3.9 was built from source because of the depreciation, and the executable and the scripts folder have been added to path so the python install works for other scripts, etc... Just for fun I tried installing the unbundled version with python 3.11 ( installed through the python website), which doesn't work, but I expected such because of the 3.9 message. A bundled install does work but the expected limitation of only being able to run a script through the run script option in the GUI.

I've looked through the documentation but some clarifications would help a lot:
For the unbundled version, does TexGen specifically require a 32 bit version of Python 3.9 or does it now require 64 bit? (I believe I read in the documentation that python 32 bit was required but this may be an earlier version). I have tried the 32 bit version but could try again with the 64 bit.
Does the python executable/ any other folders etc need to have a specialized name for texGen to recognize them (perhaps the weirdness of the source build affected this)? Does the scripts folder need to be within the same container as the executable?

If I were to try compiling from source, I wanted to double check some things in the documentation (https://texgen.sourceforge.io/index.php ... rom_Source) for version 3.13 before starting because it seems the documentation may be focused on a 3.11 install (or a version with a 2.7 build):
- I assume instead of Python 2.7, Python 3 is now required.
- Is the SWIG install still version 4.0.0
(although not for the initial build I'd also like to check):
- What specifically should be installed from OpenCascade because the link is broken:  https://dev.opencascade.org/getocc/download
- Is version 6.3 of VTK still the version to use
- Is ver 3.0.4 of wxWidgets (wxMSW) still used (I see it is possible to get this from their github)
- Does the cpp unit test version matter?

Any advice is much appreciated! Thank you!
rn_84
Posts: 3
Joined: Thu Aug 31, 2023 10:33 pm

Re: Install questions for 3.13

Post by rn_84 »

Some updates: Things still do not work but more troubleshooting:

I have went with a conda environment of Python 3.9 in hopes of this being smoother. Python 3.9 on its own from this environment works fine. I have added this environment to the path and based on previous forum post I have also added Texgen to path as:
C:\\...\TexGen\Python\libxtra\TexGen

Just in case (because at this point I am trying anything) I have also added
C:\\...\TexGen
to cover all bases as well.

Still when trying to use the exe for the GUI it doesn't work and when running a script directly I get this error message:
from . import _Core
ImportError: DLL load failed while importing _Core: The specified module could not be found.

I have also uninstalled and re-downloaded and re-tried an install of a bundled version just to start trying some things but now this does not work.
Any help is much appreciated. Thank you!
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: Install questions for 3.13

Post by louisepb »

Hi,
Sorry you're having problems with the new build. As far as I know the unbundled version should be fine - issues with this normally boil down to path issues. You may need to add the TexGen site-packages folder.
One thing to note is that, because of the change in the way that the scripts are executed, you need to import TexGen.Core at the start of all scripts.
All TexGen builds are now 64-bit so if you have any 32-bit python installations lurking this could be an issue (unfortunately they all have the same name!).

I have updated the instructions for building from source on the website and there is also now a Powerpoint presentation with the steps for builiding in the GitHub repo

Hope that helps,
Louise
rn_84
Posts: 3
Joined: Thu Aug 31, 2023 10:33 pm

Re: Install questions for 3.13

Post by rn_84 »

Thank you so much for the message and all of your help! I really appreciate it! Going through a source install helped me work through where things were amiss (and where things I believed to be 64 were 32... so I think I can move back to the bundle)! The new instructions are great - thank you so much!

Things are almost there!

I have been importing TexGen.Core and I'm using some of the example scripts for simple tests.

The only challenge I have is that the scripts I try to run outside of the GUI (e.g., in vs code with the correct interpreter set up or in the terminal directly) just show an error.

from TexGen.Core import *
File "C:\Python39\lib\site-packages\TexGen\Core.py", line 13, in <module>
from . import _Core
ImportError: DLL load failed while importing _Core: The specified module could not be found.

I have also tried this on a second pc with a bundle install (that I now have working)... in the bundle install I've manually added the libxtra and texgen directories to the path in the script (as well as tried to just copy the folder over to site-packages), while on the source install they're already linked (were correctly placed in site-packages). In the second pc with a bundle install the same scripts run fine through the run script function in the gui

By site-packages, is there something I'm missing here? Other packages I've installed here with pip (like numpy) work fine and also can be accessed through the gui.
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: Install questions for 3.13

Post by louisepb »

Hi,
I have to confess that I'm not sure about this one. I'll have to see if I can replicate the error. Does it work if your scripts are in the same folder as the TexGen installation?
I'm in the run up to the start of term so may not get to it immediately.
Best wishes,
Louise
robtclay
Posts: 1
Joined: Tue May 21, 2024 11:09 am

Re: Install questions for 3.13

Post by robtclay »

Hi,

I was just working through a source install and I encountered a similar error so I was wondering if there was ever a resolution found for this?

Specifically, I get this error whenever I try to import from TexGen outside of the TexGen GUI, like with VS Code for example:

from TexGen.Core import *
File "C:\Python39\lib\site-packages\TexGen\Core.py", line 13, in <module>
from . import _Core
ImportError: DLL load failed while importing _Core: The specified module could not be found.

I was able to build everything to the point where I built TexGen in Visual Studio and can launch/use the GUI successfully. I chose 64 bit options everywhere where there was a choice given. I also can run other non-TexGen Python scripts successfully through VS Code.

If there wasn't a solution found for this, I'd be happy to check things and provide any other helpful information that could be used to identify the issue.
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: Install questions for 3.13

Post by louisepb »

Hi,
I'm afraid that I had forgotten about this issue. I've just had a quick look and it seems that the problem may be with Python 3.9 not using the path to find dlls. There's a thread here: https://github.com/pytest-dev/pytest/discussions/10692 Unfortunately I don't have time to investigate this further right now.
If you find a solution it would be great if you could let me know. Otherwise I'll take another look when I have time.
Best wishes,
Louise
Post Reply