Git Product home page Git Product logo

Comments (10)

bottler avatar bottler commented on June 25, 2024

How have you installed pytorch3d? The library must be built before it can be used (it is not pure python). It does not yet build straightforwardly on Windows.

from pytorch3d.

ethansu1992 avatar ethansu1992 commented on June 25, 2024

Hi bottler, i have installed pytorch3d:

(base) C:\Users\ethansu>conda activate aienv

(aienv) C:\Users\ethansu>python
Python 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 14:00:49) [MSC v.1915 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

import pytorch3d

hence i am not sure why its still not working. Thank you so much for your help

from pytorch3d.

bottler avatar bottler commented on June 25, 2024

Like I asked. How have you installed it? import pytorch3d working only shows that it can find the python source files, not that it has been built or installed.

from pytorch3d.

ethansu1992 avatar ethansu1992 commented on June 25, 2024

Apologies for misunderstanding your question. After i have clone from Github
The next step that i did was:
python setup.py build --build-base=/path/to/pytorch3d
(pytorch3d) C:\Users\ethansu\pytorch3d>python setup.py install

from pytorch3d.

bottler avatar bottler commented on June 25, 2024

That looks like you're running in a conda environment called pytorch3d not aienv, but I'm thinking you've tried the same thing more than once. I don't think those commands will have run successfully unless you've modified the code, because we know the library doesn't build properly on windows yet. (See for example PR #9)

The build should have created a file with a long name called something like _C.cpython...pyd . If you are have GPU support enabled it should be several megabytes in size. The install should have copied it (possibly with a slight rename) to somewhere in <your conda env>/lib/python3.6/site-packages/pytorch3d. Can you check this?

One thing to think of is that even if the build fails and the install fails, the command import pytorch3d in python will succeed if you are running in the directory of your checkout; however you will get errors about _C being missing if you try to use some pytorch3d functionality. But the error DLL load failed: The specified procedure could not be found suggests more that the DLL (i.e. the pyd file) exists but does not have the PyInit__C symbol defined, which is strange.

from pytorch3d.

ethansu1992 avatar ethansu1992 commented on June 25, 2024

I have tried to search for _C.cpython...pyd and i have found the file in \Lib\site-packages\pytorch3d-0.1-py3.6-win-amd64.egg\pytorch3d_C.cp36-win_amd64.pyd Is this the file you are mentioning?

Do you think re-creating a new environment and rebuilding would be a better solution?

from pytorch3d.

bottler avatar bottler commented on June 25, 2024

Yes, that sounds like the right file. I hope it is about a megabyte in size or larger. I haven't experimented enough with the windows build to know how it might go wrong. Yes, it might be useful to start again in a new environment.

As a next step, I would be tempted to open up that file pytorch3d_C.cp36-win_amd64.pydin dependency walker (depends.exe) or similar to get an idea of what its interface is like. Does it have any weird dependencies? Does it export PyInit__C? (I would expect you to see warnings that it depends on some python DLL which it cannot find. As long as it is the right python version this doesn't matter).

from pytorch3d.

nikhilaravi avatar nikhilaravi commented on June 25, 2024

@ethansu1992 I'm closing this issue. Feel free to reopen it if you are still experiencing problems.

from pytorch3d.

steezy18 avatar steezy18 commented on June 25, 2024

Hello, please I ran into this error while I was trying to preprocess the Shapenet dataset. I had it working all along until I re-installed the Pytorch GPU in the Anaconda environment. I will appreciate any help please. I had tried the above suggestion but not working.

(pytorch3d) C:\meshrcnn>python tools/preprocess_shapenet.py --r2n2_dir C:\meshrcnn\datasets\shapenet\ShapeNetRendering --shapenet_dir C:\meshrcnn\datasets\shapenet\ShapeNetCore_v1 --shapenet_binvox_dir C:\meshrcnn\datasets\shapenet\ShapeNetCore.v1.binvox --splits_file C:\meshrcnn\datasets\shapenet\pix2mesh_splits_val05.json --output_dir ./datasets/shapenet/ShapeNetV1processed --zip_output
Traceback (most recent call last):
File "C:\meshrcnn\tools\preprocess_shapenet.py", line 12, in
from pytorch3d.io import load_obj
File "C:\ProgramData\Anaconda3\envs\pytorch3d\lib\site-packages\pytorch3d\io_init_.py", line 8, in
from .obj_io import load_obj, load_objs_as_meshes, save_obj
File "C:\ProgramData\Anaconda3\envs\pytorch3d\lib\site-packages\pytorch3d\io\obj_io.py", line 22, in
from pytorch3d.renderer import TexturesAtlas, TexturesUV
File "C:\ProgramData\Anaconda3\envs\pytorch3d\lib\site-packages\pytorch3d\renderer_init_.py", line 7, in
from .blending import (
File "C:\ProgramData\Anaconda3\envs\pytorch3d\lib\site-packages\pytorch3d\renderer\blending.py", line 11, in
from pytorch3d import _C
ImportError: DLL load failed while importing _C: The specified procedure could not be found.

(pytorch3d) C:\meshrcnn>python tools/preprocess_shapenet.py --output_dir ./datasets/shapenet/ShapeNetprocessed --zip_output
Traceback (most recent call last):
File "C:\meshrcnn\tools\preprocess_shapenet.py", line 12, in
from pytorch3d.io import load_obj
File "C:\ProgramData\Anaconda3\envs\pytorch3d\lib\site-packages\pytorch3d\io_init_.py", line 8, in
from .obj_io import load_obj, load_objs_as_meshes, save_obj
File "C:\ProgramData\Anaconda3\envs\pytorch3d\lib\site-packages\pytorch3d\io\obj_io.py", line 22, in
from pytorch3d.renderer import TexturesAtlas, TexturesUV
File "C:\ProgramData\Anaconda3\envs\pytorch3d\lib\site-packages\pytorch3d\renderer_init_.py", line 7, in
from .blending import (
File "C:\ProgramData\Anaconda3\envs\pytorch3d\lib\site-packages\pytorch3d\renderer\blending.py", line 11, in
from pytorch3d import _C
ImportError: DLL load failed while importing _C: The specified procedure could not be found.

from pytorch3d.

bottler avatar bottler commented on June 25, 2024

@steezy18 Please open a new issue if you want us to help, giving all the details of how you installed. This issue was resolved more than two years ago.

from pytorch3d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.