Problems setting the RLagent from this:

During the “make” step in the instructions (

I get this error:

ubuntu@jetson-0420219087068:~/RoboND-DeepRL-Project/build$ make
[ 38%] Built target jetson-utils
[ 40%] Building CXX object CMakeFiles/jetson-reinforcement.dir/c/rlAgent.cpp.o
In file included from /home/ubuntu/RoboND-DeepRL-Project/c/rlAgent.cpp:6:0:
/home/ubuntu/RoboND-DeepRL-Project/c/pyTorch.h:14:19: fatal error: TH/TH.h: No such file or directory
compilation terminated.
CMakeFiles/jetson-reinforcement.dir/build.make:227: recipe for target ‘CMakeFiles/jetson-reinforcement.dir/c/rlAgent.cpp.o’ failed
make[2]: *** [CMakeFiles/jetson-reinforcement.dir/c/rlAgent.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target ‘CMakeFiles/jetson-reinforcement.dir/all’ failed
make[1]: *** [CMakeFiles/jetson-reinforcement.dir/all] Error 2
Makefile:83: recipe for target ‘all’ failed
make: *** [all] Error 2

It seems that there is a problem with pytorch? Can i just add the missing file TH/TH.h somewhere? Or should I re-install pytorch manually?


Suppose you should get the header file installed when running cmake …/.

Do you meet any error when running the cmake command?
Or could you manually run the again?


Hi camransyed, note that this project should be running JetPack 3.3 if you are not using that.

Thanks Dusty. I am running Jetpack 3.3.1. It was the option available with the sdkManager

OK yes, that should be able to work. So if there isn’t TH/TH.h found, it probably means that PyTorch build didn’t succeed. Can you try manually running these steps from your jetson-reinforcement/build directory? You may want to rm -r -f build and start fresh.

# PyTorch v0.3 install script from
	sudo apt-get install python-pip

	# upgrade pip
	pip --version
	pip install --upgrade pip==9.0.1
	pip --version	# pip 9.0.1 from /home/ubuntu/.local/lib/python2.7/site-packages (python 2.7)

	# lock OpenAI Gym before version 10 (breaking changes)
	sudo pip install gym==0.9.1

	# stuff for OpenAI Gym examples
	sudo apt-get install python-tk python-gi-cairo
	sudo apt-get install libfreetype6-dev	# needed by matplotlib

	sudo pip install matplotlib
	sudo pip install pyglet==1.3.1	# lock pyglet because we need to patch it

	sudo sed -i 's/_have_getprocaddress = True/_have_getprocaddress = False/' /usr/local/lib/python2.7/dist-packages/pyglet/gl/

	# setproctitle extension used by A3G
	sudo pip install setproctitle 
	# install numpy
	sudo pip install numpy

	# see
	# use <= v0.2.0

	# clone pyTorch repo
	git clone
	cd pytorch
	git tag
	git checkout v0.3.0 
	git branch
	git submodule update --init

	# install prereqs
	sudo pip install -U setuptools
	sudo pip install -r requirements.txt

	# Develop Mode:
	python build_deps
	sudo python develop

	cd torch
	ln -s
	cd lib
	ln -s
	cd ../../

	git clone
	sudo pip install -r examples/reinforcement_learning/requirements.txt 

	git clone -b v0.2.0
	cd vision
	sudo python install

	sudo apt-get install swig
	sudo pip install box2D