projectchrono/chrono

ModuleNotFoundError: No module named 'pychrono'

Jeremiah-Rittenhouse opened this issue · 0 comments

I am having trouble trying to get pychrono working. I have been following the install guide: https://api.projectchrono.org/development/pychrono_installation.html

Potentially similar threads that I attempted to follow to troubleshoot my problems:
#140
#198

I am on Windows. I have attempted exactly inputting the conda commands from the install guide as:

conda config --add channels https://conda.anaconda.org/conda-forge
conda config --add channels https://conda.anaconda.org/intel
conda create -n chrono python=3.9
conda activate chrono
conda install -c conda-forge mkl=2020
conda install -c conda-forge numpy=1.24.0
conda install -c conda-forge irrlicht=1.8.5
conda install -c conda-forge pythonocc-core=7.4.1
conda install -c nvidia/label/cuda-11.7.0 cuda-toolkit
conda install -c conda-forge glfw

The first source of confusion is step 6 on the install guide: "Install the PyChrono conda package downloaded in step 3 above (for release or development Chrono code, a given operating system, and built for a given Python version):
conda install <pychrono_package>.tar.bz2
Note that installing the default conda package (latest package with label 'main' for your current operating system and Python version):
conda install -c projectchrono pychrono
may not always work as expected. We strongly recommend downloading the appropriate PyChrono installation archive and install it from a local file as described above."

I have tried installing the "main" and "release" versions of "win-64/pychrono-8.0.0-py39_0.tar.bz2" by downloading it from the anaconda projectchrono page. I tried
conda install D:\anaconda3\chrono\pychrono-8.0.0-py39_0.tar.bz2
and it seemed to install correctly. However, whenever I try to import pychrono as chrono in python I get a ModuleNotFoundError:
ModuleNotFoundError: No module named 'pychrono'

Which of these steps should be working? Should I be including the file path with the install command?

The latest thing I have tried is
conda list -n chrono
to list the packages in the current environment, which leads to this, seeming to indicate pychrono has been installed:

(chrono) C:\Users\Jeremiah Rittenhouse>conda list -n chrono
# packages in environment at D:\anaconda3\envs\chrono:
#
# Name                    Version                   Build  Channel
bzip2                     1.0.8            vc14h53ad9d4_9  [vc14]  intel
ca-certificates           2022.12.7            h5b45459_0    conda-forge
certifi                   2022.12.7          pyhd8ed1ab_0    conda-forge
cuda-cccl                 11.7.58                       0    nvidia/label/cuda-11.7.0
cuda-command-line-tools   11.7.0                        0    nvidia/label/cuda-11.7.0
cuda-compiler             11.7.0                        0    nvidia/label/cuda-11.7.0
cuda-cudart               11.7.60                       0    nvidia/label/cuda-11.7.0
cuda-cudart-dev           11.7.60                       0    nvidia/label/cuda-11.7.0
cuda-cuobjdump            11.7.50                       0    nvidia/label/cuda-11.7.0
cuda-cupti                11.7.50                       0    nvidia/label/cuda-11.7.0
cuda-cuxxfilt             11.7.50                       0    nvidia/label/cuda-11.7.0
cuda-documentation        11.7.50                       0    nvidia/label/cuda-11.7.0
cuda-libraries            11.7.0                        0    nvidia/label/cuda-11.7.0
cuda-libraries-dev        11.7.0                        0    nvidia/label/cuda-11.7.0
cuda-memcheck             11.7.50                       0    nvidia/label/cuda-11.7.0
cuda-nsight-compute       11.7.0                        0    nvidia/label/cuda-11.7.0
cuda-nvcc                 11.7.64                       0    nvidia/label/cuda-11.7.0
cuda-nvdisasm             11.7.50                       0    nvidia/label/cuda-11.7.0
cuda-nvml-dev             11.7.50                       0    nvidia/label/cuda-11.7.0
cuda-nvprof               11.7.50                       0    nvidia/label/cuda-11.7.0
cuda-nvprune              11.7.50                       0    nvidia/label/cuda-11.7.0
cuda-nvrtc                11.7.50                       0    nvidia/label/cuda-11.7.0
cuda-nvrtc-dev            11.7.50                       0    nvidia/label/cuda-11.7.0
cuda-nvtx                 11.7.50                       0    nvidia/label/cuda-11.7.0
cuda-nvvp                 11.7.50                       0    nvidia/label/cuda-11.7.0
cuda-sanitizer-api        11.7.50                       0    nvidia/label/cuda-11.7.0
cuda-toolkit              11.7.0                        0    nvidia/label/cuda-11.7.0
cuda-tools                11.7.0                        0    nvidia/label/cuda-11.7.0
cuda-visual-tools         11.7.0                        0    nvidia/label/cuda-11.7.0
fontconfig                2.13.1            hdcb13c4_1002    conda-forge
freetype                  2.10.2           vc14he233217_1  [vc14]  intel
glfw                      3.3.8                h8ffe710_0    conda-forge
icu                       67.1                 h33f27b4_0    conda-forge
intel-openmp              2023.0.0         h57928b3_25922    conda-forge
intelpython               2023.0.0                      1    intel
irrlicht                  1.8.5                h739eaf8_2    conda-forge
jpeg                      9e                   hcfcfb64_3    conda-forge
libblas                   3.9.0                     8_mkl    conda-forge
libcblas                  3.9.0                     8_mkl    conda-forge
libcublas                 11.10.1.25                    0    nvidia/label/cuda-11.7.0
libcublas-dev             11.10.1.25                    0    nvidia/label/cuda-11.7.0
libcufft                  10.7.2.50                     0    nvidia/label/cuda-11.7.0
libcufft-dev              10.7.2.50                     0    nvidia/label/cuda-11.7.0
libcurand                 10.2.10.50                    0    nvidia/label/cuda-11.7.0
libcurand-dev             10.2.10.50                    0    nvidia/label/cuda-11.7.0
libcusolver               11.3.5.50                     0    nvidia/label/cuda-11.7.0
libcusolver-dev           11.3.5.50                     0    nvidia/label/cuda-11.7.0
libcusparse               11.7.3.50                     0    nvidia/label/cuda-11.7.0
libcusparse-dev           11.7.3.50                     0    nvidia/label/cuda-11.7.0
libiconv                  1.17                 h8ffe710_0    conda-forge
liblapack                 3.9.0                     8_mkl    conda-forge
libnpp                    11.7.3.21                     0    nvidia/label/cuda-11.7.0
libnpp-dev                11.7.3.21                     0    nvidia/label/cuda-11.7.0
libnvjpeg                 11.7.2.34                     0    nvidia/label/cuda-11.7.0
libnvjpeg-dev             11.7.2.34                     0    nvidia/label/cuda-11.7.0
libpng                    1.6.37           vc14h53ad9d4_8  [vc14]  intel
libxml2                   2.10.3               hc3477c8_0    conda-forge
libzlib                   1.2.13               hcfcfb64_4    conda-forge
mkl                       2020.4             hb70f87d_311    conda-forge
nsight-compute            2022.2.0.13                   0    nvidia/label/cuda-11.7.0
numpy                     1.24.0           py39hbccbffa_0    conda-forge
occt                      7.4.0                h823b557_3    conda-forge
openssl                   1.1.1t               hcfcfb64_0    conda-forge
pip                       22.2.2           py39haa95532_0    intel
pychrono                  8.0.0                    py39_0    <unknown>
python                    3.9.15               he6a1c74_2    intel
python_abi                3.9                      2_cp39    conda-forge
pythonocc-core            7.4.1            py39h3d1c7c5_0    conda-forge
sdl                       1.2.60               h63175ca_0    conda-forge
sdl2                      2.26.4               h63175ca_0    conda-forge
setuptools                63.4.1           py39haa95532_0    intel
six                       1.16.0             pyh6c4a22f_0    conda-forge
sqlite                    3.40.0               h2bbff1b_0    intel
tbb                       2020.3           vc14_intel_311  [vc14]  intel
tk                        8.6.12               h2bbff1b_0    intel
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
vc                        14.2                 h21ff451_1    intel
vs2015_runtime            14.34.31931         h4c5c07a_10    conda-forge
wheel                     0.37.1             pyhd3eb1b0_0    intel
wincertstore              0.2              py39haa95532_2    intel
xz                        5.2.6                h8cc25b3_0    intel
zlib                      1.2.13               hcfcfb64_4    conda-forge

(chrono) C:\Users\Jeremiah Rittenhouse>                                   

Pychrono is listed as a folder in the directory:
D:\anaconda3\envs\chrono\Lib\site-packages

One more thing is that it seems to work correctly when I run a demo .py file from the chrono environment, as in
(chrono) C:\Users\Jeremiah Rittenhouse>python D:\anaconda3\envs\chrono\Lib\site-packages\pychrono\demos\solidworks\demo_SW_irrlicht.py
seems to work correctly. Irrlicht opens and shows a scene.

I am at a loss for troubleshooting from here. It seems like I have a folder structure or directory issue (environment versus virtual environment?), but I don't know what to do to fix it. Can anyone help me figure out how to get my chrono environment working?