Giter Club home page Giter Club logo

Comments (13)

183amir avatar 183amir commented on July 18, 2024 1

from caffe-feedstock.

jakirkham avatar jakirkham commented on July 18, 2024 1

Good catch @183amir .

So we install the executable Python scripts in the conda environment. This way you can run them wherever you need to.

That being said, if you still need those importable scripts, maybe just rename the directory to caffe_python or something else so as not to conflict. Then you should be able to import them.

from caffe-feedstock.

jakirkham avatar jakirkham commented on July 18, 2024 1

Yeah, it looks like the from ._caffe import ... is getting you in trouble as that is a shared object that is only in the built package of caffe. You might be able to do something really hacky and add a symlink to where it is in site-packages. I don't really recommend it, but Caffe's Python packaging is suboptimal. So it may be an acceptable short-term solution.

In any event, thanks for raising this. It reminded me to bump issue ( BVLC/caffe#4170 ) again.

from caffe-feedstock.

jakirkham avatar jakirkham commented on July 18, 2024

Thanks for the bug report. Unable to reproduce this on the CentOS 6 docker image currently. Could you please provide some more info about your system like what version of Linux Mint and glibc version?

from caffe-feedstock.

oliviaguest avatar oliviaguest commented on July 18, 2024

I am probably being dim but don't I need to be in that folder to run those python scripts for the neural network?

from caffe-feedstock.

oliviaguest avatar oliviaguest commented on July 18, 2024

Nope! [Trying to run this: https://github.com/xiaolonw/caffe-video_triplet in case that is useful information.]

olivia@Love11 ~/GitHub/caffe-video_triplet/caffe_python $  source activate CAFFE
(CAFFE) olivia@Love11 ~/GitHub/caffe-video_triplet/caffe_python $ python -c 'import caffe; print(caffe.__version__)'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "caffe/__init__.py", line 1, in <module>
    from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver
  File "caffe/pycaffe.py", line 13, in <module>
    from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, \
ImportError: No module named _caffe

from caffe-feedstock.

oliviaguest avatar oliviaguest commented on July 18, 2024

Aha! Ignore above - was definitely being way way too under-caffeinated. Solved because of your advice! Thanks!

from caffe-feedstock.

183amir avatar 183amir commented on July 18, 2024

@oliviaguest I am closing this since looks like your problem is solved and it's not related to this feedstock anyway.

from caffe-feedstock.

oliviaguest avatar oliviaguest commented on July 18, 2024

I didn't have a line with that though. For what it's worth all I have was "import caffe" nothing with an underscore. Ideally I'd like to be able install caffe without a virtual environment, but have not managed it so far. I would like to use my Titan X too.

from caffe-feedstock.

jakirkham avatar jakirkham commented on July 18, 2024

It appears in your traceback. 😕

In any event, I think this reduces down to what @183amir has already said. One can't have another caffe importable on the path.

from caffe-feedstock.

oliviaguest avatar oliviaguest commented on July 18, 2024

@jakirkham The traceback is a result of running the following as you can see from above too: python -c 'import caffe; print(caffe.__version__)'
Nothing in that line contains caffe with an underscore. Am I missing something?

from caffe-feedstock.

jakirkham avatar jakirkham commented on July 18, 2024

What are the contents of your current directory?

from caffe-feedstock.

oliviaguest avatar oliviaguest commented on July 18, 2024

The problem is fixed because I was within the caffe directory. So now when I start the virtual environment it works.

from caffe-feedstock.

Related Issues (16)

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.