szagoruyko / torch-opencv-demos

Torch7+OpenCV+ConvNets
167 stars 56 forks source link

I cannot install in here: #6

Open bemoregt opened 8 years ago

bemoregt commented 8 years ago

I cannot install in here: "OpenCV_DIR=/usr/local/Cellar/opencv3/3.1.0/share/OpenCV luarocks install cv"

My Error Message Gere: "Error: No results matching query were found."

What's wrong with me?

MY H/W: Macbook Pro 2012Late i7 S/W: El Capitan

szagoruyko commented 8 years ago

have you installed torch http://torch.ch?

bemoregt commented 8 years ago

Yes, of course.

szagoruyko commented 8 years ago

what is the output of which luarocks

bemoregt commented 8 years ago

$ which luarocks /Users/sgi/torch-cl/install/bin/luarocks

Thanks~

szagoruyko commented 8 years ago

you should try with official torch distro, I'm not sure why torch-cl doesn't know about cv. cc @hughperkins

hughperkins commented 8 years ago

Hi @bemoregt Can you raise an issue at https://github.com/hughperkins/distro-cl/issues/new please?

hughperkins commented 8 years ago

Note that luarocks install cv runs for me. Or at least, finds something, clones it, tries to install it, fails because sudo apt-get install opencv installs 2.4.9.1. this is on ubuntu 16.04.

I'll see if I can get hold of opencv 3.1, and at least confirm it installs on ubuntu.

But... osmseting that occurs to me. should the quotes not be around the OpenCV_DIR assignment? something like perhaps:

"OpenCV_DIR=/usr/local/Cellar/opencv3/3.1.0/share/OpenCV" luarocks install cv
hughperkins commented 8 years ago

(Also, did you make sure to do source ~/torch-cl/install/bin/torch-activate just before running hte luarocks install command?)

hughperkins commented 8 years ago

On ubuntu 16.04 it builds ok for me. What I did:

# downloaded opencv
# unzipped
mkdir build
cd build
ccmake ..
# 'c' for configure
# set pretty much everything to 'OFF', except 'ml' and 'img' https://gist.github.com/hughperkins/c2ee47a0a6629d7a96969f12ec6c01da
# quit out from ccmake 
cmake ..
make -j 4
source ~/torch-cl/bin/activate
OpenCV_DIR=/home/user/Downloads/opencv-3.1.0/build luarocks install

Thats it!

$ OpenCV_DIR=/home/user/Downloads/opencv-3.1.0/build luarocks install cv
Installing https://raw.githubusercontent.com/torch/rocks/master/cv-scm-1.rockspec...
Using https://raw.githubusercontent.com/torch/rocks/master/cv-scm-1.rockspec... switching to 'build' mode
Cloning into 'torch-opencv'...
remote: Counting objects: 202, done.
remote: Compressing objects: 100% (180/180), done.
remote: Total 202 (delta 40), reused 76 (delta 19), pack-reused 0
Receiving objects: 100% (202/202), 2.03 MiB | 187.00 KiB/s, done.
Resolving deltas: 100% (40/40), done.
Checking connectivity... done.
cmake -E make_directory build;
cd build;
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/ubuntu/torch-cl/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/ubuntu/torch-cl/install/lib/luarocks/rocks/cv/scm-1"; 
make

-- The C compiler identification is GNU 4.9.3
-- The CXX compiler identification is GNU 4.9.3
-- Check for working C compiler: /usr/bin/gcc-4.9
-- Check for working C compiler: /usr/bin/gcc-4.9 -- works
-- Detecting C compiler ABI info
[...snip ...]
-- Installing: /home/ubuntu/torch-cl/install/lib/luarocks/rocks/cv/scm-1/lua/cv/imgcodecs/init.lua
-- Installing: /home/ubuntu/torch-cl/install/lib/luarocks/rocks/cv/scm-1/lua/cv/imgproc/init.lua
-- Installing: /home/ubuntu/torch-cl/install/lib/luarocks/rocks/cv/scm-1/lua/cv/ml/init.lua
Updating manifest for /home/ubuntu/torch-cl/install/lib/luarocks/rocks
cv scm-1 is now built and installed in /home/ubuntu/torch-cl/install/ 

So, it does install ok, on ubuntu. In your case... I think maybe an enviornment issue? But ...as for what .... ???

bemoregt commented 8 years ago

Thanks a lot.

2016-08-04 12:51 GMT+09:00 Hugh Perkins notifications@github.com:

On ubuntu 16.04 it builds ok for me. What I did:

downloaded opencv

unzipped

mkdir build cd build ccmake ..

'c' for configure

set pretty much everything to 'OFF', except 'ml' and 'img' https://gist.github.com/hughperkins/c2ee47a0a6629d7a96969f12ec6c01da

quit out from ccmake

cmake .. make -j 4 source ~/torch-cl/bin/activate OpenCV_DIR=/home/user/Downloads/opencv-3.1.0/build luarocks install

Thats it!

$ OpenCV_DIR=/norep/Downloads/opencv-3.1.0/build luarocks install cv Installing https://raw.githubusercontent.com/torch/rocks/master/cv-scm-1.rockspec... Using https://raw.githubusercontent.com/torch/rocks/master/cv-scm-1.rockspec... switching to 'build' mode Cloning into 'torch-opencv'... remote: Counting objects: 202, done. remote: Compressing objects: 100% (180/180), done. remote: Total 202 (delta 40), reused 76 (delta 19), pack-reused 0 Receiving objects: 100% (202/202), 2.03 MiB | 187.00 KiB/s, done. Resolving deltas: 100% (40/40), done. Checking connectivity... done. cmake -E make_directory build; cd build; cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/ubuntu/torch-cl/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/ubuntu/torch-cl/install/lib/luarocks/rocks/cv/scm-1"; make

-- The C compiler identification is GNU 4.9.3 -- The CXX compiler identification is GNU 4.9.3 -- Check for working C compiler: /usr/bin/gcc-4.9 -- Check for working C compiler: /usr/bin/gcc-4.9 -- works -- Detecting C compiler ABI info [...snip ...] -- Installing: /home/ubuntu/torch-cl/install/lib/luarocks/rocks/cv/scm-1/lua/cv/imgcodecs/init.lua -- Installing: /home/ubuntu/torch-cl/install/lib/luarocks/rocks/cv/scm-1/lua/cv/imgproc/init.lua -- Installing: /home/ubuntu/torch-cl/install/lib/luarocks/rocks/cv/scm-1/lua/cv/ml/init.lua Updating manifest for /home/ubuntu/torch-cl/install/lib/luarocks/rocks cv scm-1 is now built and installed in /home/ubuntu/torch-cl/install/

So, it does install ok, on ubuntu. In your case... I think maybe an enviornment issue? But ...as for what .... ???

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/szagoruyko/torch-opencv-demos/issues/6#issuecomment-237445595, or mute the thread https://github.com/notifications/unsubscribe-auth/ASgkZKbUqS7vdQwd2zrxCkmy8rDqXTWiks5qcWHYgaJpZM4JT1NG .