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

Compatible with Python3? #19

Open
wbensvage opened this issue Feb 18, 2018 · 19 comments
Open

Compatible with Python3? #19

wbensvage opened this issue Feb 18, 2018 · 19 comments

Comments

@wbensvage
Copy link

I was using Python3 and tried to install OpenDR via pip. But I failed and found opendr now seems only compatible with Python 2? So can I know is there any plan to move opendr forward to Python 3? And is there any way I can overcome this currently?

@hset911
Copy link

hset911 commented May 24, 2018

anyone could reply this?

@SelvamArul
Copy link

There is an updated version of opendr here but this one is not official though.

@ghost
Copy link

ghost commented Aug 22, 2018

I tried installing opendr on python 3 on anaconda using both pip and conda, but failed. Can anyone help me on this? I also tried finding .whl file for opendr, but couldn't.

@AnirudhPuligandla
Copy link

@SelvamArul Do you know how we can install that? Thanks in advance

@SelvamArul
Copy link

@AnirudhPuligandla Could you please elaborate on your question? Sorry, I didn't get what you mean by install. It is just a python package. Noting to install there.

@AnirudhPuligandla
Copy link

@SelvamArul Sorry for the vague question! Actually I am testing some code that uses opendr to display images and a 3D mesh. So, i have this modern opendr package in my PYTHONPATH with the other requirements installed. But, i am not sure if this package can readily replace opendr (in terms of fucntions to open a window, display etc.) as i still encounter the same error "no module named opendr". I am using python3.5

I hope that is clear.

Thanks

@SelvamArul
Copy link

@AnirudhPuligandla What is the exact path you have in your PYTHONPATH? I will share my setting as an example. Maybe you can spot any differences to yours.
I cloned the updated opendr from here to ~/workspace and then added ~/workspace/opendr to my PYTHONPATH.
Let's check with python interpreter.

import sys
for i in sys.path:
    print (i)
...
/home/arul/workspace/opendr
...
# opendr is in sys.path
import opendr
print (opendr)
<module 'opendr' from '/home/arul/workspace/opendr/opendr/__init__.py'>
print (chumpy)
<module 'chumpy' from '/home/arul/workspace/opendr/chumpy/__init__.py'>

Hope this helps.

@neonb88
Copy link

neonb88 commented Mar 25, 2019

@SelvamArul To clarify, have you gotten it working in python3? Also, did you manage to do everything with PYTHONPATH? I'm not sure how python3 absolute imports works under the hood, nor how pip and conda do

@SelvamArul
Copy link

ya, this fork is python3 compatible. I have forked it further to make to compatible with latest versions of NumPy and Scipy, and few other bug fixes related to wrong dimension specification while reading out the rendered images from OpenGL. You can find my fork here.

Regrading the PYTHONPATH, I didn't get your question. Could you please describe your issue in detail?

@tszhang97
Copy link

ya, this fork is python3 compatible. I have forked it further to make to compatible with latest versions of NumPy and Scipy, and few other bug fixes related to wrong dimension specification while reading out the rendered images from OpenGL. You can find my fork here.

Regrading the PYTHONPATH, I didn't get your question. Could you please describe your issue in detail?

I used your fork and met this error:
AttributeError: 'ColoredRenderer' object has no attribute 'vbo_verts_face'
Could you help me find out what's wrong?

@erezposner
Copy link

@willie1997 have you managed to solve this issue?

@salmedina
Copy link

I was finally able to install OpenDR through PIP on Python 3.7 in a conda environment. What worked like magic for me was installing libosmesa6-dev:

conda create -n smpl python=3.7
conda activate smpl
conda install numpy
conda install chumpy
conda install -c conda-forge opencv

sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev
sudo apt-get install libosmesa6-dev
pip install opendr

Hope this helps!

@erezposner
Copy link

@salmedina are you working under linux/windows?

@salmedina
Copy link

salmedina commented Sep 19, 2019

@erezposner This was on Ubuntu 18.04.3 LTS

@WilliamWang1994
Copy link

WilliamWang1994 commented Sep 23, 2019

Maybe you can try the modern version from polmorenoc.
it seem like work on windows.

@yohanshin
Copy link

@salmedina Following your description, it perfectly works on my ubuntu-18.04 LTS too! Just instead, since conda doesn't have their chumpy cloud, try pip install chumpy

@yutao007
Copy link

conda install chumpy ------wrong

@bmquynhlinh
Copy link

This solution works for virtual env python3.10 too
sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev sudo apt-get install libosmesa6-dev pip install opendr

@Qiicx
Copy link

Qiicx commented Apr 8, 2024

I was finally able to install OpenDR after upgrade Cpython
pip install --upgrade Cython

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