bharat-b7 / MultiGarmentNetwork

Repo for "Multi-Garment Net: Learning to Dress 3D People from Images, ICCV'19"
282 stars 65 forks source link

mesh installing error in python2.7 #17

Closed akshay951228 closed 4 years ago

akshay951228 commented 4 years ago

`urity -fPIC -DNDEBUG=1 -DCGAL_NDEBUG=1 -DMESH_CGAL_AVOID_COMPILED_VERSION=1 -DCGAL_HAS_NO_THREADS=1 -DCGAL_NO_AUTOLINK_CGAL=1 -Imesh/src -I/home/jolookbook3d/.local/lib/python2.7/site-packages/numpy/core/include -I/tmp/pip-N8AvP8-build/build/temp.linux-x86_64-2.7/CGAL-4.7/include -I/usr/include/python2.7 -c mesh/src/aabb_normals.cpp -o build/temp.linux-x86_64-2.7/mesh/src/aabb_normals.o -O3 -fopenmp In file included from /home/jolookbook3d/.local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822:0, from /home/jolookbook3d/.local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12, from /home/jolookbook3d/.local/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4, from mesh/src/aabb_normals.cpp:4: /home/jolookbook3d/.local/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]

warning "Using deprecated NumPy API, disable it with " \

  ^~~~~~~
mesh/src/aabb_normals.cpp:35:27: error: variable ‘PyModuleDef moduleDef’ has initializer but incomplete type
 static struct PyModuleDef moduleDef =
                           ^~~~~~~~~
mesh/src/aabb_normals.cpp:37:5: error: ‘PyModuleDef_HEAD_INIT’ was not declared in this scope
     PyModuleDef_HEAD_INIT,
     ^~~~~~~~~~~~~~~~~~~~~
mesh/src/aabb_normals.cpp:37:5: note: suggested alternative: ‘PyObject_HEAD_INIT’
     PyModuleDef_HEAD_INIT,
     ^~~~~~~~~~~~~~~~~~~~~
     PyObject_HEAD_INIT
mesh/src/aabb_normals.cpp: In function ‘void PyInit_aabb_normals()’:
mesh/src/aabb_normals.cpp:46:24: error: ‘PyModule_Create’ was not declared in this scope
     PyObject *module = PyModule_Create(&moduleDef);
                        ^~~~~~~~~~~~~~~
mesh/src/aabb_normals.cpp:46:24: note: suggested alternative: ‘_PyModule_Clear’
     PyObject *module = PyModule_Create(&moduleDef);
                        ^~~~~~~~~~~~~~~
                        _PyModule_Clear
mesh/src/aabb_normals.cpp:50:12: error: return-statement with a value, in function returning 'void' [-fpermissive]
     return module;
            ^~~~~~
mesh/src/aabb_normals.cpp: In function ‘PyObject* aabbtree_normals_nearest(PyObject*, PyObject*)’:
mesh/src/aabb_normals.cpp:150:36: warning: narrowing conversion of ‘S’ from ‘size_t {aka long unsigned int}’ to ‘npy_intp {aka long int}’ inside { } [-Wnarrowing]
     npy_intp result1_dims[] = {1, S};
                                    ^
mesh/src/aabb_normals.cpp:157:40: warning: narrowing conversion of ‘S’ from ‘size_t {aka long unsigned int}’ to ‘npy_intp {aka long int}’ inside { } [-Wnarrowing]
         npy_intp result2_dims[] = {S, 3};
                                        ^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

error Cleaning up... Removing source in /tmp/pip-N8AvP8-build Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-N8AvP8-build/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-RcYrjS-record/install-record.txt --single-version-externally-managed --compile --boost-location= --user --prefix=" failed with error code 1 in /tmp/pip-N8AvP8-build/ Exception information: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 360, in run prefix=options.prefix_path, File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 784, in install **kwargs File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 878, in install spinner=spinner, File "/usr/lib/python2.7/dist-packages/pip/utils/init.py", line 725, in call_subprocess % (command_desc, proc.returncode, cwd)) InstallationError: Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-N8AvP8-build/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-RcYrjS-record/install-record.txt --single-version-externally-managed --compile --boost-location= --user --prefix=" failed with error code 1 in /tmp/pip-N8AvP8-build/ Makefile:5: recipe for target 'all' failed make: *** [all] Error `

no issue in mesh installation in python3 but in python3 opendr package is not available ,

In python 2.7 mesh package install getting error , unable to move forward

bharat-b7 commented 4 years ago

Hi, you don't require opendr for this project so you could port this code to python3. For python2.7 support for mesh package please raise an issue at their official page or try using a different mesh package such as trimesh.

akshay951228 commented 4 years ago

while running visualize_garments.py I'm error opendr module error

bharat-b7 commented 4 years ago

can you post your error traceback here?

akshay951228 commented 4 years ago

Screenshot from 2020-03-04 19-23-54

error screenshot

Silverster98 commented 4 years ago

Screenshot from 2020-03-04 19-23-54

error screenshot

you need to install opendr.

sudo pip install opendr
neonb88 commented 4 years ago

@akshay951228 if this solves your issue, please close the issue. Otherwise, we can continue to help here. You may need to do pip install opendr==0.77. I think there were some bugs with the latest version

akshay951228 commented 4 years ago

@neonb88 opendr not work in python3

neonb88 commented 4 years ago

@akshay951228 details, please. Conda or pip? python version? (python3.7, python3.6, etc.) What error message(s) do you get? What are all the commands you ran?

neonb88 commented 4 years ago

@akshay951228 Is this resolved?

andrewjong commented 4 years ago

FYI I successfully ran this repo after porting the code to Python3 (used 2to3, also had to change the pickle loading to open files explicitly as "rb" and set encoding="latin1", as well as integer divisions). I used conda, am on Manjaro linux.

neonb88 commented 4 years ago

I did similar steps to @andrewjong and got everything working

LiuYuZzz commented 4 years ago

the mesh version had updated to support python 3, and the old version supports python 2 which had been removed from the repo(you can not get the old version from ). IF you want to use the old version for python 2, you can find it in the fork

neonb88 commented 4 years ago

@andrewjong seems like you already looked here, but here and in the installation.md, I mentioned how to get openpose working on docker; basically on Ubuntu with CUDA 10, you just do

sudo apt-get install -y docker-ce
docker pull exsidius/openpose    # might have preface this line with sudo