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

Running RigNet in python3.9 and get Aborted #76

Open
WisarutBholsithi opened this issue Nov 25, 2022 · 11 comments
Open

Running RigNet in python3.9 and get Aborted #76

WisarutBholsithi opened this issue Nov 25, 2022 · 11 comments

Comments

@WisarutBholsithi
Copy link

I have tried to install RigNet to be used in python3.9 through the installation process:

  1. Installing the necessary library
    pip install numpy scipy matplotlib tensorboard open3d opencv-python
    pip install rtree
    pip install trimesh[easy]
  2. If conda had not been installed yet, installing conda and set Evironment Variable
  3. Install pytorch to the lastest version (pytorch==1.12.0) and the necessary pytorch library in the following manner:
    conda install pytorch==1.12.0 torchvision cudatoolkit -c pytorch
    pip install torch-scatter -f https://data.pyg.org/whl/torch-1.12.0+$cu.html
    pip install torch-sparse -f https://data.pyg.org/whl/torch-1.12.0+$cu.html
    pip install torch-cluster -f https://data.pyg.org/whl/torch-1.12.0+$cu.html
    pip install torch-spline-conv -f https://data.pyg.org/whl/torch-1.12.0+$cu.html
    pip install torch-geometric
  4. Activate Rignet through Cuda in the following manner:
    conda create --name rignet_cuda11 python=3.9
    conda activate rignet_cuda11

To test that everything works, from the anaconda console go into RigNet-master folder and run:

python quick_start.py

However, I got Aborted result as shown here:
ProblemRunningRigNet

Is there any solution for this problem?
BTW, I still unable to access to get testing and training data from this website for training though.

@WisarutBholsithi
Copy link
Author

WisarutBholsithi commented Dec 13, 2022

Now, I have to downgrade the python used in cuda environment from python 3.9.12 to python3.7.15 to be compatible with Rignet code that use python3.7 with the following modification to allow installation of pytorch package wheels compatible with pytorch1.6 without causing the installation errors.

pip install torch-scatter==2.0.6 -f https://data.pyg.org/whl/torch-1.6.0+cu101.html
pip install torch-sparse==0.6.7 -f https://data.pyg.org/whl/torch-1.6.0+cu101.html
pip install torch-cluster==1.5.7 -f https://data.pyg.org/whl/torch-1.6.0+cu101.html
pip install torch-spline-conv==1.2.0 -f https://data.pyg.org/whl/torch-1.6.0+cu101.html
pip install torch-geometric

This installation works well when I ran the command to generate dataset (python3 gen_dataset.py).

However, when I ran the code for quick start, I got a trouble with torch-geometric since the latest version of torch-geometric library (torch-geometric2.2) keeps asking for torch.profiler which is not available in pytorch 1.6 but available in pytorch1.8.1 or later.
Which version of torch-geometric which is compatible with pytorch 1.6? Please help me
It seems to me that torch-geometric1.7.1 is the one which is compatible with pytorch 1.6
https://pytorch-geometric.readthedocs.io/en/1.7.1/notes/installation.html

@zhan-xu
Copy link
Owner

zhan-xu commented Dec 13, 2022

Hi, I tried more recent versionS of pytorch and torch-geometric in my new project https://github.com/zhan-xu/MoRig/blob/master/environment.yml. Would you like to take a look?

@WisarutBholsithi
Copy link
Author

Hi, I tried more recent versionS of pytorch and torch-geometric in my new project https://github.com/zhan-xu/MoRig/blob/master/environment.yml. Would you like to take a look?

Going to try once I have tried every measure though.

@WisarutBholsithi
Copy link
Author

WisarutBholsithi commented Dec 14, 2022

Hi, I tried more recent versionS of pytorch and torch-geometric in my new project https://github.com/zhan-xu/MoRig/blob/master/environment.yml. Would you like to take a look?

I have tried to install MoRig through conda environment but there must be some issues that caused the Docker container to be crashed that require reinstallation of Docker as well as ubuntu, python3.7 and conda. I has better apply manual installation steps by steps rather than using command "conda env create -f environment.yml"

@WisarutBholsithi
Copy link
Author

WisarutBholsithi commented Dec 16, 2022

Now, when I test the example "fbx_parser.py", I have found that this example need the Autodesk Maya API1.0 in python3.
Which version of Autodesk Maya you have used which have Autodesk Maya API1.0 in python3 to be applied to your example?
It seems to me that I need to install Maya2022 which has Autoesk Maya API in python3 according to this example:
https://forums.autodesk.com/t5/maya-programming/openmaya-in-anaconda3-with-jupiter-notebook/td-p/11008233

@zhan-xu
Copy link
Owner

zhan-xu commented Dec 17, 2022

I have used this script in Maya 2018. I have also used Maya 2020, 2022 recently with functions in there, and I didn't have problem. Are you using Jupiter Notebook? I used the script editor within Maya.

@WisarutBholsithi
Copy link
Author

I have used this script in Maya 2018. I have also used Maya 2020, 2022 recently with functions in there, and I didn't have problem. Are you using Jupiter Notebook? I used the script editor within Maya.

BTW, I just wonder how did you run your code with the use of python library of Maya 2018 and later version in Windows or in Linux (Ubuntu). If it is in Linux (Ubuntu), I just wonder how did you do this kind of thing since I'm trying to run your code in Docker that use Ubuntu in the container.

@zhan-xu
Copy link
Owner

zhan-xu commented Dec 20, 2022

I've been using Maya in Windows. I assume you mean numpy and scipy? you can check https://forums.autodesk.com/t5/maya-programming/guide-how-to-install-numpy-scipy-in-maya-windows-64-bit/td-p/5796722

basically you can install any library using the pip from mayapy.

@WisarutBholsithi
Copy link
Author

I've been using Maya in Windows. I assume you mean numpy and scipy? you can check https://forums.autodesk.com/t5/maya-programming/guide-how-to-install-numpy-scipy-in-maya-windows-64-bit/td-p/5796722

basically you can install any library using the pip from mayapy.

Well, after I have counterchecked into your python wheel and 7z files along with the application of command "mayapy -m pip list", I got the list of necessary library files as follows:

  1. llvmlite==0.20.0 . However, the compatibility issues with python3.7 has compelled me to use command "conda install llvmlite==0.38.0" instead
  2. numba==0.35.0 However, the compatibility issues with python3.7 has compelled me to use command "conda install numba==0.55.1" instead
  3. pyHook==1.5.1 This one is unresolved issue even after downloadining pyHook-1.5.1-cp37-cp37m-win_amd64.whl before applying the command "pip install --no-deps pyHook-1.5.1-cp37-cp37m-win_amd64.whl" and still failed to install
  4. numexpr==2.6.2 However, the compatibility issues with python3.7 has compelled me to use command "conda install numexpr==2.8.4" so that I do not have to downgrade numpy library in comparison with the case of "conda install numexpr==2.7.0"
  5. scipy==0.19.0 However, the compatibility issues with python3.7 has compelled me to the existing version which is scipy==1.7.3
  6. numpy==1.13.1 However, the compatibility issues with python3.7 has compelled me to the existing version which is numpy==1.21.5
  7. future==0.18.2 - no problem of installing with command "future==0.18.2"
  8. pip==20.2.2 - better use the existing version which is pip==22.3.1
  9. pymel==1.2.0 However, the compatibility issues with python3.7 has compelled me to use command "pip install --no-deps pymel" to make successfu installation as pymel==1.2.0
  10. PySide2==5.15.2 However, the compatibility issues with python3.7 has compelled me to use command "pip install --no-deps PySide2" to make successful installation as PySide2==5.15.2.1
  11. setuptools==41.2.0 - better use the existing version which is setuptools==65.5.0
  12. shiboken2==5.15.2However, the compatibility issues with python3.7 has compelled me to use command "pip install --no-deps shiboken2" to make successful installation as shiboken2==5.15.2.1
  13. shiboken2-generator==5.15.2 However, the compatibility issues with python3.7 has compelled me to use command "pip install
    --index-url=http://download.qt.io/official_releases/QtForPython/
    --trusted-host download.qt.io
    shiboken2 pyside2 shiboken2_generator
    " to make successful installation as shiboken2-generator==5.15.2.1

@WisarutBholsithi
Copy link
Author

BTW, I have already followed the instruction to install Python packages shown in mayapy before setting up File path variables for Maya, Initializing the Maya Environment in and for Python along with Setting environment variables using Maya.env as the way to set path to access into Maya API 1.0.

However, I still get the following error when I run the command python fbx_parser.py, and still getting the folowing error:

  File "fbx_parser.py", line 1, in <module>
    import maya.OpenMaya as om
ModuleNotFoundError: No module named 'maya'

Did I do something wrong with my environment variable setting?

What is your way to set up environment variables so python.exe in C:\Users[user_name].conda\envs\rignet could manage to access Maya API in C:\Program Files\Autodesk\Maya2022\Python37\Lib\site-packages without troubles.
Please help me.

@zhan-xu
Copy link
Owner

zhan-xu commented Dec 28, 2022

I see the problem. For fbx_parser.py, I was using mayapy, which is python shipped within maya, not the one in conda env.
You can run fbx_parser.py in maya's scriptor editor.

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