Closed ilikealotgithub1234 closed 6 years ago
Try to have a look at this link that explains how to install torch Here.
The installation script adds torch to your PATH variable. You just have to source it once to refresh your env variables.
You can try to do this in the directory you want to run torch from:
#On Linux with bash
source ~/.bashrc
#On Linux with zsh
source ~/.zshrc
#On OSX or in Linux with none of the above.
source ~/.profile
upon running ./install.sh
i get this message. When th is run I get the same message. Should I uninstall everything with rm -rf ~/torch
because something is interfering with torch from the initial download?
home/erik/torch/pkg/paths/paths.c:1012:20: note: each undeclared identifier is reported only once for each function it appears in
CMakeFiles/Makerfile2:67: recipe for target 'CMakeFiles/paths.dir/all' failed
make[1]: *** [CMakeFiles/paths,dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Error: Build error: Failed building.
I would suggest to try to run rm -rf ~/torch
and try to follow the instructions in this page again. If you get error in the installation, post your errors here.
I have reinstalled it. The good news is that when I run th
by itself it is run and I get the Torch logo and about information. Then I cloned this repository into my home directory. But when I run the test code th train.lua -gpuid -1
, I get an error:
/home/erik/torch/install/bin/luajit: cannot open train.lua: No such file or directory.
Should train.lua
be in this directory for it to work?
Yes, when calling th train.lua -gpuid -1
you must be in the directory containing train.lua
.
Thanks! This works perfectly. The code works when I run it in the char-rnn-master
directory. Closing this issue.
I'm getting the same issue of Command th not found, even though torch was downloaded fine with no errors. When I run source ~/.profile, I get No such file or directory.
Same for me
When I run source ~/.profile, I get No such file or directory.
Probably there is no .profile in your home directory? If you installed torch in $HOME/torch
you can try this command:
export PATH=$PATH:$HOME/torch/install/bin
I would suggest to try to run
rm -rf ~/torch
and try to follow the instructions in this page again. If you get error in the installation, post your errors here.
I got this error E: Package 'python-software-properties' has no installation candidate
Try to have a look at this link that explains how to install torch Here.
The installation script adds torch to your PATH variable. You just have to source it once to refresh your env variables.
You can try to do this in the directory you want to run torch from:
#On Linux with bash source ~/.bashrc #On Linux with zsh source ~/.zshrc #On OSX or in Linux with none of the above. source ~/.profile
@pietrocalzini I got error E: Package 'python-software-properties' has no installation candidate while following those steps
Clone the Torch repo (forked to work with CUDA 10).
!git clone https://github.com/nagadomi/distro.git torch --recursive
Install Torch.
import os
os.chdir('./torch/')
!bash install-deps
!./install.sh
Activate Torch.
!. ./install/bin/torch-activate
Make sure the installation worked.
!./install/bin/th
Result:
______ __ | Torch7
/_ __/__ ________/ / | Scientific computing for Lua.
/ / / _ \/ __/ __/ _ \ | Type ? for help
/_/ \___/_/ \__/_//_/ | https://github.com/torch
| http://torch.ch
th> ^C
This is a pretty basic seeming problem but its baffled me for quite some time. Once I install all of the software from the directions and get to the first test thingy, I get the error:
th: command not found
. This is also confusing since under~/torch/install/bin
you can clearly seeth
.If it matters I'm also using Ubuntu Desktop 17.10. `