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

pyvXray plugin installation inquiry #11

Open
weirui810 opened this issue Nov 14, 2024 · 5 comments
Open

pyvXray plugin installation inquiry #11

weirui810 opened this issue Nov 14, 2024 · 5 comments

Comments

@weirui810
Copy link

I encountered difificulties while attempting to install and utilize the pyvXray plugin. Specifically, I have been facing difficulties with importing the PIL module within the Abaqus Python environment, resulting in an ImportError: DLL load failed.
I am wondering if you or any member of your team has previously encountered a similar issue during the installation process of the pyvXray plugin. If so, I would be grateful if you could share any solutions or workarounds that proved effective for you.
In the event that your team has not faced this particular problem, would it be possible for you to provide details of your environment configuration that allowed the successful installation and operation of the pyvXray plugin?

@mhogg
Copy link
Owner

mhogg commented Nov 17, 2024

Hi @weirui810,

It's been a while since I've used this repo actually. And I haven't tried it on a recent version of Abaqus. It should be much easier to install on recent Abaqus versions that have Python 3 and now also abqPip. If you try to install a recent version of PIL/Pillow in Abaqus it probably won't work (you would need a version that uses Python 2.7, which would be from around 2019).

What version of Abaqus are you using?

@weirui810
Copy link
Author

Thank you very much for getting back to me. I am using Abaqus 2022, which indeed comes with Python 2.7. I've made sure that the PIL I've installed is the correct version that matches Python 2.7, and I'm working with the latest master version of pyvXray.

Despite these efforts, I'm still facing the ImportError: DLL load failed issue when trying to import the PIL.Image class within the Abaqus Python environment. I suspect this might be due to some compatibility issues with the PIL/Pillow and Abaqus 2022.

I understand that it's been a while since you last used this repository, and the environment might have changed since then. However, I was wondering if you might have come across any similar issues in the past or if you have any suggestions for troubleshooting this particular problem?

@mhogg
Copy link
Owner

mhogg commented Nov 18, 2024

I can have a look into it and offer some suggestions. To help, could you please tell me:

  • Would it be possible for you to upgrade to Abaqus 2024 that uses Python 3? This would probably make things much easier
  • What operating system are you using?
  • Are you installing PIL or Pillow? Either way, what version?

@mhogg
Copy link
Owner

mhogg commented Nov 18, 2024

Just thinking - If using an older Abaqus version (using Python 2.7), there is a way to still call an external python environment that could be the latest python (>=3.9) with the latest Pillow installed here (rather than the Abaqus python). This approach would avoid issues installing into Abaqus python.

@weirui810
Copy link
Author

Thank you for offering to look into this issue and provide suggestions.
To answer your questions:

  1. Upgrading to Abaqus 2024 with Python 3 is an option I am considering. However, due to project constraints and the need for compatibility with existing scripts, I would prefer to find a solution that works with Abaqus 2022 and Python 2.7 if possible.

  2. I am using Windows 11, and the version number is 22631.

  3. I am installing Pillow. The version I have installed is 6.2.2, which is supposed to be compatible with Python 2.7.

For your suggestion to use an external Python environment with the latest Pillow for generating virtual X-rays, it could indeed bypass the compatibility issues I'm facing with the Abaqus 2022 Python 2.7 environment.
However, I'm concerned about how this approach would work with your plugin script, which relys on calling Abaqus' modules to read Abaqus data. If I move to an external Python environment, would I still be able to use your plugin code effectively? Or would it require significant modifications to work outside of the Abaqus Python environment?

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

2 participants