-
Dear all, I hope this message finds you well. I am reaching out to seek assistance with an issue I encountered while attempting to use PyAnsys. I'm working with Python on VS code. Upon installing PyAnsys via pip and attempting to run a script, I encountered the following error message: ModuleNotFoundError: No module named 'ansys.geometry'; 'ansys' is not a package I have already taken the following steps to troubleshoot the issue:
Despite these efforts, I am still unable to resolve the error. I would greatly appreciate any guidance or assistance you can provide to help me resolve this issue and successfully utilize PyAnsys for my project. The package ansys is in the same directory as numpy: C:\Users\x\AppData\Local\Programs\Python\Python312\Lib\site-packages\ansys\geometry\core C:\Users\x\AppData\Local\Programs\Python\Python312\Lib\site-packages\numpy VS code has no problem running numpy but cannot run ansys. import ansys output: ['builtins', 'cached', 'doc', 'file', 'loader', 'name', 'package', 'spec', 'ansys'] If you require any additional information or logs to assist with troubleshooting, please don't hesitate to ask. Your help in resolving this matter would be greatly appreciated. Thank you very much for your time and support. Best regards, Julien |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 12 replies
-
Hi @t0xine! Thanks for reaching out, let me try to support you in your request. Please, verify with me the following:
>>> pip freeze
...
pyansys==???????
... If the above is not true, please run
import ansys.geometry.core as pygeometry
print(pygeometry.__version__) |
Beta Was this translation helpful? Give feedback.
-
Here is what I have done (everything on the Command Prompt):
|
Beta Was this translation helpful? Give feedback.
Hmm...
I'm worried about the "vs code" folder. Spaces are typically a problem... Can we do as follows? You will just need to copy paste my commands on a terminal.
mkdir C:\Users\lac\Documents\pygeometry_test
cd C:\Users\lac\Documents\pygeometry_test
python -m venv .venv
.venv\Scripts\activate
python -m pip install pyansys
python
Please, follow each command step by step. If you encounter …