OS & Tools/Linux

[Jetson_nano] virtualenvwrapper

전두선 2020. 2. 18. 14:59

jetson nano

 

1. Let’s get started by installing the required system packages:

$ sudo apt-get install git cmake
$ sudo apt-get install libatlas-base-dev gfortran
$ sudo apt-get install libhdf5-serial-dev hdf5-tools
$ sudo apt-get install python3-dev

 

2. Let’s first install pip, Python’s package manager:

$ wget https://bootstrap.pypa.io/get-pip.py
$ sudo python3 get-pip.py
$ rm get-pip.py

 

3. virtualenvwrapper setting

a) virtualenvwrapper

$ sudo pip install virtualenv virtualenvwrapper

 

b) 환경변수 설정

$ gedit ~/.bashrc

 

제일 하단에 아래 내용을 추가 후 저장한다.

# virtualenvwrapper 
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
source /usr/local/bin/virtualenvwrapper.sh
$ source ~/.bashrc

 

> 가상환경 생성 및 접속하기

# 가상환경 생성하기
$ mkvirtualenv [가상환경 이름] -p python3

# 가상환경 접속하기
$ workon [가상환경 이름] 

 

4. Installing TensorFlow and Keras on the NVIDIA Jetson Nano

> numpy

$ pip install numpy

 

> tensorflow-gpu

$ pip install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 tensorflow-gpu==1.13.1+nv19.3
Installing NVIDIA’s tensorflow-gpu package took ~40 minutes on my Jetson Nano.

* pip install tensorflow-gpu 사용하지 말것.
ref : https://devtalk.nvidia.com/default/topic/1048776/official-tensorflow-for-jetson-nano-/

 

> scipy & keras

$ pip install scipy
$ pip install keras
These installs took ~35 minutes.

 

ref : https://www.pyimagesearch.com/2019/05/06/getting-started-with-the-nvidia-jetson-nano/

1 2 3 4 5 6