Skip to content

could not import redmax_py #5

Open

Description

@Navneet-Kaur21

I have tried installing using the source and the docker method. (For both DiffHand and TactileSimulation)
I keep getting the same error again and again. Could you please help solving this?

Traceback (most recent call last):
File "test_sim_speed.py", line 13, in
import redmax_py as redmax
ModuleNotFoundError: No module named 'redmax_py'

Activity

  1. eanswer commented on Nov 17, 2023

    @eanswer
    Owner

    Did you install DiffRedMax successfully (Step 4 in README instruction):

    cd externals/DiffHand/core
    python setup.py install
    

    After you successfully install it, you should be able to import redmax_py in your conda environment.

  2. Navneet-Kaur21 commented on Nov 17, 2023

    @Navneet-Kaur21
    Author
  3. Navneet-Kaur21 commented on Nov 17, 2023

    @Navneet-Kaur21
    Author

    Screenshot from 2023-11-17 09-49-00~2

  4. Navneet-Kaur21 commented on Nov 17, 2023

    @Navneet-Kaur21
    Author

    I have followed the instructions in the README file. (docker and source both). In both the cases it gives the same error.

  5. eanswer commented on Nov 17, 2023

    @eanswer
    Owner

    That's strange. I just tried to install the codebase from scratch and it works for me. Right after you install redmax_py and open a python session in your command line, could you run import redmax_py?
    image

  6. Navneet-Kaur21 commented on Nov 17, 2023

    @Navneet-Kaur21
    Author

    On running import redmax_py I get this:
    Screenshot from 2023-11-17 10-33-22

  7. eanswer commented on Nov 17, 2023

    @eanswer
    Owner

    I see, could you check two things for me:

    1. Which python path you are using, run below in terminal
    which python
    
    1. Check whether redmax_py is installed in your conda environment:
    pip list | grep redmax-py
    
  8. eanswer commented on Nov 17, 2023

    @eanswer
    Owner

    May be also which pip

  9. Navneet-Kaur21 commented on Nov 17, 2023

    @Navneet-Kaur21
    Author
    1. /home/anaconda3/bin/python
    2. returns nothing.
    3. /home/anaconda3/bin/pip
  10. eanswer commented on Nov 17, 2023

    @eanswer
    Owner

    It seems that you are not in your conda env as shown in the python and pip path

  11. Navneet-Kaur21 commented on Nov 17, 2023

    @Navneet-Kaur21
    Author

    Okay. Here are the results in the env:

    1. /home/navneetkaur/anaconda3/envs/tactile_control_env/bin/python
    2. redmax-py 0.0.1
    3. /home/navneetkaur/anaconda3/envs/tactile_control_env/bin/pip
  12. eanswer commented on Nov 17, 2023

    @eanswer
    Owner

    Then it seems you have installed redmax_py. Can you import it if you open a python via /home/navneetkaur/anaconda3/envs/tactile_control_env/bin/python

  13. Navneet-Kaur21 commented on Nov 17, 2023

    @Navneet-Kaur21
    Author

    Uhh no.
    (tactile_control_env) navneetkaur@navneet:~/TactileSimulation/externals/DiffHand/core$ /home/navneetkaur/anaconda3/envs/tactile_control_env/bin/python
    Python 3.8.0 (default, Nov 6 2019, 21:49:08)
    [GCC 7.3.0] :: Anaconda, Inc. on linux
    Type "help", "copyright", "credits" or "license" for more information.

    import redmax_py
    Traceback (most recent call last):
    File "", line 1, in
    ModuleNotFoundError: No module named 'redmax_py'

  14. eanswer commented on Nov 17, 2023

    @eanswer
    Owner

    that's so weird, I'm sorry that I have no other ideas about what went wrong...

  15. Navneet-Kaur21 commented on Nov 17, 2023

    @Navneet-Kaur21
    Author

    I tried it with a different pc. It is giving the same error. Could there be anything missing in the installation? Some prerequisites that I need before I can install it successfully?

  16. Runze-Zhao commented on Nov 21, 2023

    @Runze-Zhao

    I have run into the same issue

  17. Navneet-Kaur21 commented on Nov 21, 2023

    @Navneet-Kaur21
    Author

    could you please let me know if you figure it out @Runze-Zhao

    I have run into the same issue

  18. Navneet-Kaur21 commented on Nov 22, 2023

    @Navneet-Kaur21
    Author

    also, @eanswer could you share the folder - anaconda3/envs/tactile_control_env/lib/python3.8/site-packages/redmax_py-0.0.1-py3.8-linux-x86_64.egg or what files should it contain.

  19. Runze-Zhao commented on Nov 22, 2023

    @Runze-Zhao

    could you please let me know if you figure it out @Runze-Zhao

    I have run into the same issue

    The problem on my side is that I don't recursively have to download all the folders under the project (DiffHand/pybind11),also lack of the package of libXxf86vm.After downloading the relevant files, re-run the setup.py and it will work fine.
    I hope that helps.

  20. eanswer commented on Jan 15, 2024

    @eanswer
    Owner

    @Navneet-Kaur21 Let me know if the issue has been successfully solved by recursively cloning the project as mentioned by @Runze-Zhao so that I can close the issue.

  21. LZC0113 commented on Mar 8, 2024

    @LZC0113

    Hello, I have run into the same issue. I cannot even install the 'redmax_py' pkg.

  22. LZC0113 commented on Mar 8, 2024

    @LZC0113

    Hello, I have run into the same issue. I cannot even install the 'redmax_py' pkg.

    I solve the problem by rebuilding the environment and now it works lol. Some packages must be missing when first time install the env.

  23. cidxb commented on Jun 13, 2024

    @cidxb

    I ran into the same problem too.

    First of all, i was using the docker image, since i got trouble by installation on
    cd core python setup.py install
    So i running it on the docker image instead.

    And I after I got in the image, i used pip install -e . in the path /DiffHand/core/ .
    I don't know if it is right practice, since if i not install it, I can't import it in the python environment or find

    Then there will be
    Preparing metadata (setup.py) ... done
    Installing collected packages: redmax-py
    Running setup.py develop for redmax-py
    and

    Installing collected packages: redmax-py
    Running setup.py develop for redmax-py
    Successfully installed redmax-py
    

    Then if i enter python into the python command line,
    i can successfully import redmax_py. But if I run the example script, the same old ModuleNotFoundError: No module named 'redmax_py' error will appear.
    So i import os, use commend line path=os.path.abspath(redmax_py.__file__) print(path)
    And it shows /workspace/DiffHand/core/redmax_py.cpython-37m-x86_64-linux-gnu.so

    It this in order? So the solution maybe add this path into the package searching path or environment path?

    Also I found that in the image, the package actually installed in the following path:

    /usr/lib/python3.7/site-packages# ls
    easy-install.pth  redmax_py-0.0.1-py3.7-linux-x86_64.egg
    

    But the rest of the pip and the using python is from

    /usr/bin/python
    /usr/local/bin/pip
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions