DLR-SC / tigl-examples

tigl, tixi and cpacs examples
2 stars 5 forks source link

error with cpacscreator to run the create_airplane.py #3

Open tigllearner opened 1 year ago

tigllearner commented 1 year ago

I create a environment named cpacscreator like this: conda create -n cpacscreator python=3.6 cpacscreator numpy imageio -c dlr-sc conda activate cpacscreator but when I run the create_airplane.py in pycharm under the cpacscreator environment,The results showed{ ImportError: DLL load failed: },I found the cpacscreator don't include some packages such as tigl3 and occ,so I can't run the demo successfully,would you help me fix my question? thanks you a lot!

joergbrech commented 1 year ago

I just verified that all requirements are installed correctly.

Are you sure you are using the correct environment in Pycharm? Go to File -> Settings -> Project -> Python Interpreter. Then click Add Interpreter. Choose the python interpretor in the directory associated with the cpacscreator conda environment.

Have you tried running the script in the console after conda activate cpacscreator?

tigllearner commented 1 year ago

yes,I run the script in the console but the results is the same,I am sure I use the correct environment which I created in Pycharm,maybe there exits some errors when I create cpacscreator ,here are some codes in the console: 48a31ff607c1e5372bc64da2bd66c57 This shows that there is no packages include tigl3,I don't know if that's the reason,could you help me answer my question?I'm looking forward to your reply!

joergbrech commented 1 year ago

cpacscreator is a branch of tigl3. So basically it is tigl3 with additional functionality. It does not depend on tigl3. It seems to me that all dependencies are there. What happens when you activate the environment and run the script in the console?

conda activate cpacscreator
python create_airplaine.py

Note that imagio is only available on Linux. You can still run the code on Windows, but the script will not concatenate the images to an animated gif for you.

tigllearner commented 1 year ago

thanks for your guideline! when I activate the environment and run the script in the console,it looks like that a9c880652de41105089fa0bf73d4036

joergbrech commented 1 year ago

Hmm, that is strange. One possibility could be a 32bit/64bit conflict. Are you using a 64bit Anaconda version? https://stackoverflow.com/questions/26621846/how-to-check-if-the-installed-anaconda-is-32-bit-or-64-bit

tigllearner commented 1 year ago

yes my Anaconda is 64bit and the conda_version is 22.9.0. I found that when I query the installed libraries by pycharm ->Terminal,it seems it's missing some packages like this, d36731839dfec55cab2631a9638009d

Maybe it didn't install the full library.

joergbrech commented 1 year ago

Can you show the output of conda list? Since you don't have pip installed in your cpacscreator environment, you are likely using your system pip, which doesn't see the libraries in your cpacscreator environment.

tigllearner commented 1 year ago

thanks for your reply,Maybe that's what you're referring to: c6a5c83d097f11ee6a18e5f580c88eb

joergbrech commented 1 year ago

I have to admit, I am a bit at a loss here. I have a Miniforge installation and slightly different versions for some of the dependencies, but overall my setup looks very similar to yours.

Can you maybe check your PATH variable? Mine starts like this:

C:\ProgramData\Miniforge3\envs\cpacscreator;C:\ProgramData\Miniforge3\envs\cpacscreator\Library\mingw-w64\bin;C:\ProgramData\Miniforge3\envs\cpacscreator\Library\usr\bin;C:\ProgramData\Miniforge3\envs\cpacscreator\Library\bin;C:\ProgramData\Miniforge3\envs\cpacscreator\Scripts;C:\ProgramData\Miniforge3\envs\cpacscreator\bin;C:\ProgramData\Miniforge3\condabin;[...]

My tigl3.dll is in C:\ProgramData\Miniforge3\envs\cpacscreator\Library\bin. This directory is in the PATH.

Can you verify that tigl3.dll is in your PATH?

tigllearner commented 1 year ago

Yes,my tigl3.dll is in E:\ProgramData\Anaconda3\envs\cpacscreator\Library\bin ,I'm very confused,however,thank you very much for your patient answer and suggestions.I will have a double check.