Has anyone installed baselines packages in Jetson TX2? https://github.com/openai/baselines
I have problems during install baselines packages and looking forward to received advice from everyone. The detail of my issue as below:
nvidia@tegra-ubuntu:~/baselines$ pip install -e .
Obtaining file:///home/nvidia/baselines
Complete output from command python setup.py egg_info:
running egg_info
creating baselines.egg-info
writing top-level names to baselines.egg-info/top_level.txt
writing dependency_links to baselines.egg-info/dependency_links.txt
writing requirements to baselines.egg-info/requires.txt
writing baselines.egg-info/PKG-INFO
writing manifest file ‘baselines.egg-info/SOURCES.txt’
warning: manifest_maker: standard file ‘-c’ not found
reading manifest file ‘baselines.egg-info/SOURCES.txt’
writing manifest file ‘baselines.egg-info/SOURCES.txt’
Traceback (most recent call last):
File “”, line 1, in
File “/home/nvidia/baselines/setup.py”, line 63, in
assert StrictVersion(re.sub(r’-?rc\d+$', ‘’, tf_pkg.version)) >= StrictVersion(‘1.4.0’)
File “/usr/lib/python3.5/distutils/version.py”, line 40, in init
self.parse(vstring)
File “/usr/lib/python3.5/distutils/version.py”, line 137, in parse
raise ValueError(“invalid version number ‘%s’” % vstring)
ValueError: invalid version number ‘1.9.0+nv18.8’
Command “python setup.py egg_info” failed with error code 1 in /home/nvidia/baselines/
nvidia@tegra-ubuntu:~/baselines$
When I tried to build install package it appear issue with version of tensorflow “1.9.0+nv18.8”. I guest that this baselines package need a version such as “1.9.0”. Based on your expert, I’m looking forward to receive your advice and help me how to install baselines package in Jetson TX2?
Thank you so much for your advice! I tried your commands, unfortunately the issue still exist as below:
nvidia@tegra-ubuntu:~$ pip install --upgrade setuptools --user
/usr/local/lib/python2.7/dist-packages/pip-18.1-py2.7.egg/pip/_vendor/requests/init.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
Requirement already up-to-date: setuptools in ./.local/lib/python2.7/site-packages (40.6.2)
nvidia@tegra-ubuntu:~$ cd baselines
nvidia@tegra-ubuntu:~/baselines$ pip install -e .
/usr/local/lib/python2.7/dist-packages/pip-18.1-py2.7.egg/pip/_vendor/requests/init.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
Obtaining file:///home/nvidia/baselines
Complete output from command python setup.py egg_info:
This Python is only compatible with Python 3, but you are running Python 2. The installation will likely fail.
running egg_info
writing requirements to baselines.egg-info/requires.txt
writing baselines.egg-info/PKG-INFO
writing top-level names to baselines.egg-info/top_level.txt
writing dependency_links to baselines.egg-info/dependency_links.txt
reading manifest file ‘baselines.egg-info/SOURCES.txt’
writing manifest file ‘baselines.egg-info/SOURCES.txt’
Traceback (most recent call last):
File “”, line 1, in
File “/home/nvidia/baselines/setup.py”, line 63, in
assert StrictVersion(re.sub(r’-?rc\d+$', ‘’, tf_pkg.version)) >= StrictVersion(‘1.4.0’)
File “/usr/lib/python2.7/distutils/version.py”, line 40, in init
self.parse(vstring)
File “/usr/lib/python2.7/distutils/version.py”, line 107, in parse
raise ValueError, “invalid version number ‘%s’” % vstring
ValueError: invalid version number ‘1.9.0+nv18.8’
----------------------------------------
Command “python setup.py egg_info” failed with error code 1 in /home/nvidia/baselines/
nvidia@tegra-ubuntu:~/baselines$
Even when I install baselines in virtual environment it stills have issue as below:
You need to use TensorFlow package newer than v1.4.0 to get OpenAI baselines works:
Could not find a version that satisfies the requirement tensorflow>=1.4.0 (from baselines) (from versions: )
No matching distribution found for tensorflow>=1.4.0 (from baselines)
Thank you so much for your advice! I tried again with your suggestion with the result as below:
Tensorflow checked in Jetson TX2:
nvidia@tegra-ubuntu:~$ python2
Python 2.7.12 (default, Nov 12 2018, 14:36:49)
[GCC 5.4.0 20160609] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
import tensorflow
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xa
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xa
/usr/local/lib/python2.7/dist-packages/requests/init.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
import tensorflow as tf
quit()
nvidia@tegra-ubuntu:~$ python3
Python 3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
import tensorflow as tf
quit()
Based on that, I think tensorflow package was completed install in Jetson TX2.
I used the solution to build baselines package directly from this link:
"
I checked again with baselines package and the code. I think the issue can come from version number “1.9.0+nv18.8”. It can lead to baselines package cannot find the version satisfy with Jetson TX. Therefore, is this possible to you to change the version from “1.9.0+nv18.8” to “1.9.0”
"
Could you please take a look and give me your advice?
Thank you so much!
Hello AastaLLL,
I re-flash jetpack 3.3 in Jetson TX2 and re-install tensorflow version 1.12 as link below:
here is the result:
nvidia@tegra-ubuntu:~$ python3
Python 3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
import tensorflow
import tensorflow as tf
and, I completed install OpenCV in Jetson TX2 as the link below:
Here is the result:
nvidia@tegra-ubuntu:~$ python3
Python 3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
import tensorflow
import tensorflow as tf
quit()
nvidia@tegra-ubuntu:~$ python2
Python 2.7.12 (default, Nov 12 2018, 14:36:49)
[GCC 5.4.0 20160609] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
import cv2
quit()
nvidia@tegra-ubuntu:~$ python3
Python 3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
import cv2
quit()
nvidia@tegra-ubuntu:~$
No matching distribution found for opencv-python (from baselines==0.1.5)
nvidia@tegra-ubuntu:~/baselines$
I tried with several ways to solve this issue! I don’t know why I cannot install baselines packages in Jetson TX2. Base on your expertise in this, please help me your suggestions!
I had the same problem when trying to installing one of the samples from OpenAI on Xavier.
I installed OpenCV for Xavier as described on jetsonhacks site.
OpenAI on GitHub has a version of baselines you have to use. Clone it but it failed on my installation because it couldn’t find the package OpenCV-python package.
Edit the setup.py in baselines project to exclude the ‘opencv-python’ in ‘install_requires’. OpenCV has already been installed above. After saving setup.py, run install of baselines as described in the README on GitHub
‘numpy’ might be installed as ‘1.16.1’. I had to uninstall and install the ‘1.15.4’ version.
switching back to ‘large-scale-curiosity’ project, and executing ‘run.py’, it fails identifying the available GPU’s on the Xavier.
Edit the utils.py and add the following to the end of the existing get_available_gpus() function
add to the top of the utils.py file:
‘from tensorflow.python.client import device_lib’
replace the Exception line in the ‘get_available_gpus’ function with the following:
local_device_protos = device_lib.list_local_devices()
return [x.name for x in local_device_protos if x.device_type == 'GPU']
The project uses a lot of RAM so make sure to add a swap drive. I use the script from jetsonhacks/postFlashTX1 project on GitHub. Adding 8G’s should be enough.