Jammy@Jetson Orin - Tensorflow & Keras Get Started: 000 setup for tutorial
1. 源由
凡事开头难!入门搭建环境难!
这里就从最基本的环境搭建和大家共一起勉!
2. 搭建环境
2.1 安装IDE环境
- jupyterlab环境
$ pip install jupyterlab
$ jupyter lab
- jupyternotebook环境
$ pip install notebook
$ jupyter notebook
注:推荐使用jupyterlab。
2.2 安装numpy
$ pip install -U numpy //升级到最新版本
$ python
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.__version__
'1.26.4'
>>>
注:升级到指定版本可以使用命令pip install numpy==1.24.3
2.3 安装keras
$ pip install --upgrade keras
$ python
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import keras
>>> keras.__version__
'3.3.2'
>>>
2.4 安装JAX
- CPU-only (Linux/macOS/Windows)
$ pip install -U "jax[cpu]"
- GPU (NVIDIA, CUDA 12, x86_64)
$ pip install -U "jax[cuda12_pip]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
注:更多关于JAX的硬件版本信息,详见:Installing JAX
2.5 安装tensorflow
$ pip install tensorflow
$ python
Python 3.10.12 (main, Nov 20 202