Coder Social home page Coder Social logo

Trouble building pycaffe about caffe HOT 9 CLOSED

microsoft avatar microsoft commented on July 19, 2024
Trouble building pycaffe

from caffe.

Comments (9)

zer0n avatar zer0n commented on July 19, 2024

This issue was already brought up in #6 . It's addressed in @pavlejosipovic 's pull request: #13. Should be available in master soon. If you don't want to wait, consider checking out the branch bvlc_win.

from caffe.

by321 avatar by321 commented on July 19, 2024

I think the actual fix belongs to wincaffe-3rdparty, which will then be pulled into this project.

Trying to build numpy, I eventually got the "ImportError: cannot import name multiarray" error msg. From web searches I saw this issue is not Windows-specific, people have been having this problem for years on Linux.

from caffe.

zer0n avatar zer0n commented on July 19, 2024

You just need to point to the Python lib library with numpy. You shouldn't need to build numpy yourself.

Please follow the instruction here: https://github.com/Microsoft/caffe#python

from caffe.

by321 avatar by321 commented on July 19, 2024

OK, got past the compiling step, still have trouble with libs during linking.

from caffe.

by321 avatar by321 commented on July 19, 2024

zer0n, do you know if anyone has successfully built and run this in python ?

Anaconda 2.7 was built using VC for Python 2.7 compiler, which is based on VC 2008
Anaconda 3.5 was built using VC 2015
We're building this using VC 2013

Will it run ?

from caffe.

pavlejosipovic avatar pavlejosipovic commented on July 19, 2024

It will run with Miniconda 2.7 x64.
Follow Python setup guide https://github.com/Microsoft/caffe#python
After you built Caffe with Python support do the following to run UT.
set PATH=%PATH%\Build\x64\Release
set PythonPath=\Build\x64\Release\pycaffe
python -m unittest discover -s <caffe_root>\python\caffe\test

from caffe.

fycus-tree avatar fycus-tree commented on July 19, 2024

Not working for me. Built from master against full Anaconda 2.7. Obviously the paths are set correct, as it's loading the module. There exists a _caffe.pyd in Release\pycaffe\caffe\

ERROR: test_io (unittest.loader.ModuleImportFailure)

ImportError: Failed to import test module: test_io
Traceback (most recent call last):
File "C:\Anaconda\lib\unittest\loader.py", line 254, in _find_tests
module = self.get_module_from_name(name)
File "C:\Anaconda\lib\unittest\loader.py", line 232, in get_module_from_name
import(name)
File "C:\Users\fycus\caffe\python\caffe\test\test_io.py", line 4, in
import caffe
File "C:\Users\fycus\caffe\Build\x64\Release\pycaffe\caffe__init
.py", line 1, in
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, >AdaDeltaSolver, AdamSolver
File "C:\Users\fycus\caffe\Build\x64\Release\pycaffe\caffe\pycaffe.py", line 13, in
from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver,
ImportError: DLL load failed: The specified module could not be found.

from caffe.

mnidza avatar mnidza commented on July 19, 2024

It definitely looks like Caffe's runtime dependencies cannot be found. Please double-check that <caffe_root>\Build\x64\Release is in your PATH, and that it is separated by a semicolon from previous dirs (if you followed @pavlejosipovic's comment above this may not be the case).

Alternatively, try copying <caffe_root>\Build\x64\Release*.dll to <caffe_root>\Build\x64\Release\pycaffe\caffe.

from caffe.

zer0n avatar zer0n commented on July 19, 2024

Yeah, just copy the DLLs to Build\x64\Release\pycaffe\caffe.

from caffe.

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.