Closed jaskiratsingh2000 closed 3 years ago
Below are the following steps to install PyTorch 1.7 version on the Jetsan Nano
git clone --recursive --branch 1.7 http://github.com/pytorch/pytorch
* Moving inside the `pytorch` folder
cd pytorch
#### Installing requirements to build PyTorch
* installing the requirements that are needed to build the pytorch
python3.8 -m pip install -r requirements.txt
#### Build PyTorch
* setup.py is a python file, the presence of which is an indication that the module/package you are about to install has likely been packaged and distributed with Distutils, which is the standard for distributing Python Modules.
python3.8 setup.py install --user
Below are the following steps to install the TorchVsion 0.8.1 version on the Jetsan Nano
Cloning the vision Repository and it will have the latest version by default
git clone --recursive --branch v0.8.1 http://github.com/pytorch/vision
Moving inside the vision
folder
cd vision
Exporting and checking for the required version. In this case 0.8.1
export BUILD_VERSION=0.8.1
python3.8 setup.py install --user
NOTE: In case if you get to see version 0.8.0 then do not worry since In short, you do have torchvision v0.8.1, it is just reporting as v0.8.0a0+45f960c. If you look at the torchvision release page 2 for v0.8.1, it has the same commit (45f960c) as reported in the version.
error: command 'gcc' failed with exit status 1
then follow these steps:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-10 g++-10
The build-essentials are libraries and packages used to build source code. They are essential to build most of the packages. By installing this package the error can be solved.
sudo apt install build-essential
The most prolific reason for the “error command gcc failed with exit status 1” is the absence of the Python development library or package. The Python development library or package is named “python-devel” or “python-dev” in most of the distributions. According to your python version select the proper python development library installation command from below.
sudo apt install python3-dev
Other popular libraries are libffi, libxslt and openssl. They generally required by Python tools and libraries for compilation. So you can install these libraries with the following commands.
sudo apt install libxslt-dev libffi-dev libssl-dev
Below are the following steps to install OpenCV 4.5.2 version on the Jetsan Nano
sudo python3.8 -m pip install opencv-python
Installation of Python 3.8.5
(Applicable on Raspberry Pi 4, Raspberry Pi Zero W, and Jetsan Nano)
Below are the following steps to install python 3.8.5 on the Hardware Devices.
Update the System
Prequisistes
Download Python
Install Python 3.8.5
Check Python Version
Make python 3.8.5 as the default version
Check Python Version
Now you have successfully installed Python 3.8.5 on Raspberry Pi.