You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently installed Pychrono on Windows, following the instructions for option A) here. I was able to install everything as directed, but when I try to run the demo file demo_CH_coords.py from spyder and vscode I get the following error:
PS C:\Users\USERNAME\anaconda3\envs\chrono\Lib\site-packages\pychrono\demos> conda activate chrono
conda : The term 'conda' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if
a path was included, verify that the path is correct and try again.
At line:1 char:1
+ conda activate chrono
+
+ CategoryInfo : ObjectNotFound: (conda:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\USERNAME\anaconda3\envs\chrono\Lib\site-packages\pychrono\demos> & C:/Users/USERNAME/anaconda3/envs/chrono/python.exe c:/Users/TLab_PC_00/anaconda3/envs/chrono/Lib/site-packages/pychrono/demos/core/demo_CH_coords.py
First tutorial for PyChrono: vectors, matrices etc.
Traceback (most recent call last):
File "c:\Users\USERNAME\anaconda3\envs\chrono\Lib\site-packages\pychrono\demos\core\demo_CH_coords.py", line 17, in <module>
import pychrono as chrono
File "C:\Users\USERNAME\anaconda3\envs\chrono\lib\site-packages\pychrono\__init__.py", line 54, in <module>
from .core import *
File "C:\Users\USERNAME\anaconda3\envs\chrono\lib\site-packages\pychrono\core.py", line 13, in <module>
from . import _core
ImportError: cannot import name '_core' from partially initialized module 'pychrono' (most likely due to a circular import) (C:\Users\USERNAME\anaconda3\envs\chrono\lib\site-packages\pychrono\__init__.py)
I have read that this is a circular import issue online (and in the error obviously) but I have no idea where it is coming from, or how to fix it, seeing as this is all part of the installation process and I have not written any code yet myself.
What I've Tried
I did try creating a simple test file called test.py with only the import statement in it: import pychrono as chrono
I get the same error when trying to run this file from the chrono venv in vscode.
Following the debug process in post #140 I tried installing Spyder in the chrono venv conda install spyder
Opening it via the anaconda navigation terminal, and running demo_CH_coords.py. I get the same error
...
ImportError: cannot import name '_core' from partially initialized module 'pychrono' (most likely due to a circular import) (C:\Users\USERNAME\anaconda3\envs\chrono\lib\site-packages\pychrono\__init__.py)
I have also tried adding ...\anaconda3 and ...\anaconda3\Scripts paths to environment variables as suggested by RichiGit97 on post #423:
I get the same result running from spyder:
...
ImportError: cannot import name '_core' from partially initialized module 'pychrono' (most likely due to a circular import) (C:\Users\USERNAME\anaconda3\envs\chrono\lib\site-packages\pychrono\__init__.py)
Additional Information
For reference, I installed this version of pychrono: win-64_pychrono-8.0.0-py310_3631.tar.bz2 using this line from the instructions: conda install win-64_pychrono-8.0.0-py310_3631.tar.bz2
And I have the following packages installed in the virtual environment chrono: (all installed during the installation process referenced above)
Issue
I recently installed Pychrono on Windows, following the instructions for option A) here. I was able to install everything as directed, but when I try to run the demo file
demo_CH_coords.py
from spyder and vscode I get the following error:I have read that this is a circular import issue online (and in the error obviously) but I have no idea where it is coming from, or how to fix it, seeing as this is all part of the installation process and I have not written any code yet myself.
What I've Tried
I did try creating a simple test file called
test.py
with only the import statement in it:import pychrono as chrono
I get the same error when trying to run this file from the chrono venv in vscode.
Following the debug process in post #140 I tried installing Spyder in the chrono venv
conda install spyder
Opening it via the anaconda navigation terminal, and running
demo_CH_coords.py
. I get the same errorI have also tried adding
...\anaconda3
and...\anaconda3\Scripts
paths to environment variables as suggested by RichiGit97 on post #423:I get the same result running from spyder:
Additional Information
For reference, I installed this version of pychrono: win-64_pychrono-8.0.0-py310_3631.tar.bz2 using this line from the instructions:
conda install win-64_pychrono-8.0.0-py310_3631.tar.bz2
And I have the following packages installed in the virtual environment chrono: (all installed during the installation process referenced above)
Plea
Please let me know if I can offer any more information to help get this issue resolved. Would really love to get Pychrono working :)
The text was updated successfully, but these errors were encountered: