Python installation: Difference between revisions

From Master of Neuroscience Wiki
Created page with "## Goal Install your very own Python and keep everything under control. Questions to [David Rotermund](mailto:davrot@uni-bremen.de) We need to download a suitable Python version from [https://www.python.org](https://www.python.org). In the case we want to use PyTorch [check here](https://pytorch.org/get-started/locally/#windows-python) or TensorFlow [check here](https://www.tensorflow.org/install/pip#software_requirements) we need to check if the Python version is okay..."
 
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
## Goal
Install your very own Python and keep everything under control.
Install your very own Python and keep everything under control.


Questions to [David Rotermund](mailto:davrot@uni-bremen.de)
Questions to [mailto:davrot@uni-bremen.de David Rotermund]


We need to download a suitable Python version from [https://www.python.org](https://www.python.org). In the case we want to use PyTorch [check here](https://pytorch.org/get-started/locally/#windows-python) or TensorFlow [check here](https://www.tensorflow.org/install/pip#software_requirements) we need to check if the Python version is okay.  
We need to download a suitable Python version from https://www.python.org. In the case we want to use PyTorch [https://pytorch.org/get-started/locally/#windows-python check here] or TensorFlow [https://www.tensorflow.org/install/pip#software_requirements check here] we need to check if the Python version is okay.


## Windows
<span id="windows"></span>
== Windows ==


I downloaded this file:  
I downloaded this file: https://www.python.org/ftp/python/3.12.7/python-3.12.7-amd64.exe
[https://www.python.org/ftp/python/3.12.7/python-3.12.7-amd64.exe](https://www.python.org/ftp/python/3.12.7/python-3.12.7-amd64.exe)


![figure 1](Image1.png)
<div class="figure">


Select "Add python.exe to Path" and then press "Install Now".
[[File:Image1.png|figure 1]]
 
</div>
Select “Add python.exe to Path” and then press “Install Now”.


We need to update pip first:
We need to update pip first:


```shell
<syntaxhighlight lang="shell">python.exe -m pip install --upgrade pip</syntaxhighlight>
python.exe -m pip install --upgrade pip
=== ffmpeg ===
```
 
### ffmpeg


You might need to create mp4 files. E.g. for saving matplotlib animations
You might need to create mp4 files. E.g. for saving matplotlib animations


Thus you need ffmpeg binaries. You find them here:
Thus you need ffmpeg binaries. You find them here: https://www.gyan.dev/ffmpeg/builds/
[https://www.gyan.dev/ffmpeg/builds/](https://www.gyan.dev/ffmpeg/builds/)


I went for  
I went for https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-6.0-full_build.7z
[https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-6.0-full_build.7z](https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-6.0-full_build.7z)


There are differnt way to install the ffmpeg binaries (ffmpeg.exe, ffplay.exe, and ffprobe.exe). The easiest way is to put them here:  
There are differnt way to install the ffmpeg binaries (ffmpeg.exe, ffplay.exe, and ffprobe.exe). The easiest way is to put them here: %LOCALAPPDATA%
%LOCALAPPDATA%\Programs\Python\Python311
=== Linux ===


### Linux
'''Please check the [https://devguide.python.org/getting-started/setup-building/#install-dependencies dependencies] beforehand!!!'''


**Please check the [dependencies](https://devguide.python.org/getting-started/setup-building/#install-dependencies) beforehand!!!**
For Fedora:


For Fedora:  
Honestly, I didn’t get this depencency thing working. And I couldn’t find a solution. However, I am installing a huge amount of packages anyway such that the required stuff is part of it. :-)


Honestly, I didn't get this depencency thing working. And I couldn't find a solution. However, I am installing a huge amount of packages anyway such that the required stuff is part of it. :-)
<syntaxhighlight lang="shell">sudo dnf install dnf-plugins-core  # install this to use 'dnf builddep'
sudo dnf builddep python3</syntaxhighlight>
Python installation (after the dependencies are solved):


```shell
<syntaxhighlight lang="shell">mkdir PySource
sudo dnf install dnf-plugins-core  # install this to use 'dnf builddep'
sudo dnf builddep python3
```
Python installation (after the dependencies are solved):
 
```shell
mkdir PySource
cd PySource
cd PySource
wget https://www.python.org/ftp/python/3.12.7/Python-3.12.7.tgz
wget https://www.python.org/ftp/python/3.12.7/Python-3.12.7.tgz
Line 58: Line 50:
make install
make install
cd /home/[YOURUSERNAME]/P3.12/bin
cd /home/[YOURUSERNAME]/P3.12/bin
./pip3 install --upgrade pip
./pip3 install --upgrade pip</syntaxhighlight>
```
<span id="bash-.bash_profile"></span>
==== Bash (.bash_profile) ====


#### Bash (.bash_profile)
<syntaxhighlight lang="shell">alias pyhton3=/home/[YOURUSERNAME]/P3.12/bin/python3
 
```shell
alias pyhton3=/home/[YOURUSERNAME]/P3.12/bin/python3
alias pyhton=/home/[YOURUSERNAME]/P3.12/bin/python3
alias pyhton=/home/[YOURUSERNAME]/P3.12/bin/python3
alias ipyhton=/home/[YOURUSERNAME]/P3.12/bin/ipython
alias ipyhton=/home/[YOURUSERNAME]/P3.12/bin/ipython
Line 73: Line 63:
alias ipython3=/home/[YOURUSERNAME]/P3.12/bin/ipython
alias ipython3=/home/[YOURUSERNAME]/P3.12/bin/ipython
alias pip3=/home/[YOURUSERNAME]/P3.12/bin/pip3
alias pip3=/home/[YOURUSERNAME]/P3.12/bin/pip3
alias pip=/home/[YOURUSERNAME]/P3.12/bin/pip3
alias pip=/home/[YOURUSERNAME]/P3.12/bin/pip3</syntaxhighlight>
```
And add '''/home/[YOURUSERNAME]/P3.12/bin''' to the '''export PATH=''' command.
 
And add **/home/[YOURUSERNAME]/P3.12/bin** to the **export PATH=** command.  


## Numba  
<span id="numba"></span>
== Numba ==


{: .topic-optional}
{: .topic-optional} This is an optional topic!
This is an optional topic!


The question is: Is numba broken in the moment or not? First we install numpy and then numba. We will observe if numba tried to change the numpy version.
The question is: Is numba broken in the moment or not? First we install numpy and then numba. We will observe if numba tried to change the numpy version.


### Windows
<span id="windows-1"></span>
 
=== Windows ===
```shell
pip install numpy
```
 
```shell
pip install numba
```
 
If so then you have to decide if you want to remove numba and the downgraded numpy version before continuing. I would remove it!
 
```shell
pip uninstall numpy numba
```
 
### Linux
 
```shell
cd /home/[YOURUSERNAME]/P3.12/bin
./pip install numpy
```
 
```shell
cd /home/[YOURUSERNAME]/P3.12/bin
./pip install numba
```
 
If so then you have to decide if you want to remove numba and the downgraded numpy version before continuing. I would remove it!


```shell
<syntaxhighlight lang="shell">pip install numpy</syntaxhighlight>
cd /home/[YOURUSERNAME]/P3.12/bin
<syntaxhighlight lang="shell">pip install numba</syntaxhighlight>
./pip uninstall numpy numba
If so then you have to decide if you want to remove numba and the downgraded numpy version before continuing. I would remove it!
```


|Package||
<syntaxhighlight lang="shell">pip uninstall numpy numba</syntaxhighlight>
|---|---|
=== Linux ===
|numba|[Numba is an open source JIT compiler that translates a subset of Python and NumPy code into fast machine code.](https://numba.pydata.org/)|


## Basic Packages you want to install
<syntaxhighlight lang="shell">cd /home/[YOURUSERNAME]/P3.12/bin
./pip install numpy</syntaxhighlight>
<syntaxhighlight lang="shell">cd /home/[YOURUSERNAME]/P3.12/bin
./pip install numba</syntaxhighlight>
If so then you have to decide if you want to remove numba and the downgraded numpy version before continuing. I would remove it!


### Windows
<syntaxhighlight lang="shell">cd /home/[YOURUSERNAME]/P3.12/bin
./pip uninstall numpy numba</syntaxhighlight>
{| class="wikitable"
|-
! Package
!
|-
| numba
| [https://numba.pydata.org/ Numba is an open source JIT compiler that translates a subset of Python and NumPy code into fast machine code.]
|}


```shell
<span id="basic-packages-you-want-to-install"></span>
pip3 install numpy scipy pandas flake8 pep8-naming black matplotlib seaborn ipython jupyterlab mypy dataclasses-json dataconf ipympl pywavelets scikit-image opencv-python scikit-learn tqdm argh sympy jsmin pybind11 pybind11-stubgen pigar asciichartpy natsort ipykernel
== Basic Packages you want to install ==
```
=== Windows ===


### Linux
<syntaxhighlight lang="shell">pip3 install numpy scipy pandas flake8 pep8-naming black matplotlib seaborn ipython jupyterlab mypy dataclasses-json dataconf ipympl pywavelets scikit-image opencv-python scikit-learn tqdm argh sympy jsmin pybind11 pybind11-stubgen pigar asciichartpy natsort ipykernel </syntaxhighlight>
=== Linux ===


```shell
<syntaxhighlight lang="shell">cd /home/[YOURUSERNAME]/P3.12/bin
cd /home/[YOURUSERNAME]/P3.12/bin
./pip3 install numpy scipy pandas flake8 pep8-naming black matplotlib seaborn ipython jupyterlab mypy dataclasses-json dataconf ipympl pywavelets scikit-image opencv-python scikit-learn tqdm argh sympy jsmin pybind11 pybind11-stubgen pigar asciichartpy natsort ipykernel filelock importlib-metadata regex fsspec</syntaxhighlight>
./pip3 install numpy scipy pandas flake8 pep8-naming black matplotlib seaborn ipython jupyterlab mypy dataclasses-json dataconf ipympl pywavelets scikit-image opencv-python scikit-learn tqdm argh sympy jsmin pybind11 pybind11-stubgen pigar asciichartpy natsort ipykernel filelock importlib-metadata regex fsspec
{| class="wikitable"
```
|-
! Package
!
|-
| numpy
| [https://numpy.org/ The fundamental package for scientific computing with Python]
|-
| scipy
| [https://scipy.org/ Fundamental algorithms for scientific computing in Python]
|-
| pandas
| [https://pandas.pydata.org/ pandas is a fast, powerful, flexible and easy to use open source data analysis and manipulation tool]
|-
| flake8
| [https://flake8.pycqa.org/en/latest/ Your Tool For Style Guide Enforcement]
|-
| pep8-naming
| [https://pypi.org/project/pep8-naming/ Check your code against PEP 8 naming conventions]
|-
| black
| [https://black.readthedocs.io/en/stable/index.html The uncompromising code formatter]
|-
| matplotlib
| [https://matplotlib.org/ Visualization with Python]
|-
| seaborn
| [https://seaborn.pydata.org/ seaborn: statistical data visualization]
|-
| ipython
| [https://ipython.org/ IPython provides a rich architecture for interactive computing]
|-
| jupyterlab
| [https://jupyter.org/ JupyterLab is the latest web-based interactive development environment for notebooks, code, and data.]
|-
| mypy
| [http://mypy-lang.org/%22 Mypy is an optional static type checker for Python that aims to combine the benefits of dynamic (or “duck”) typing and static typing.]
|-
| dataclasses-json
| [https://github.com/lidatong/dataclasses-json Easily serialize Data Classes to and from JSON]
|-
| dataconf
| [https://github.com/zifeo/dataconf Simple dataclasses configuration management for Python with hocon/json/yaml/properties/env-vars/dict support]
|-
| ipympl
| [https://github.com/matplotlib/ipympl Matplotlib Jupyter Integration]
|-
| pywavelets
| [https://pywavelets.readthedocs.io/en/latest/ PyWavelets is open source wavelet transform software for Python.]
|-
| scikit-learn
| [https://scikit-learn.org/ Simple and efficient tools for predictive data analysis]
|-
| scikit-image
| [https://scikit-image.org/ Image processing in Python]
|-
| opencv-python
| [https://opencv.org/ Open Source Computer Vision Library]
|-
| tqdm
| [https://github.com/tqdm/tqdm A Fast, Extensible Progress Bar for Python and CLI]
|-
| argh
| [https://pythonhosted.org/argh/ Building a command-line interface?] Found yourself uttering “argh!” while struggling with the API of argparse? Don’t want to lose its power but don’t need the complexity?
|-
| sympy
| [https://www.sympy.org/en/index.html SymPy is a Python library for symbolic mathematics.]
|-
| jsmin
| [https://github.com/tikitu/jsmin/ JavaScript minifier]
|-
| pybind11
| [https://github.com/pybind/pybind11 Seamless operability between C++11 and Python]
|-
| pybind11-stubgen
| For mypy
|-
| pigar
| [https://github.com/damnever/pigar A tool to generate requirements.txt for Python project, and more than that.]
|-
| asciichartpy
| [https://github.com/kroitor/asciichart Nice-looking lightweight console ASCII line charts]
|-
| natsort
| [https://github.com/SethMMorton/natsort Simple yet flexible natural sorting in Python.]
|-
| ipykernel
| IPython Kernel for Jupyter
|}
=== PyTorch ===


[https://pytorch.org/get-started/locally/#start-locally Check here] for a installation configurator.


|Package||
'''Note: Even if you don’t want to use TensorFlow, you want to install it too due to the tensorboard package.''' Tensorboard allows to track the progress during learning.
|---|---|
==== Windows ====
|numpy|[The fundamental package for scientific computing with Python](https://numpy.org/)|
===== CPU only =====
|scipy|[Fundamental algorithms for scientific computing in Python](https://scipy.org/)|
|pandas|[pandas is a fast, powerful, flexible and easy to use open source data analysis and manipulation tool](https://pandas.pydata.org/)|
|flake8|[Your Tool For Style Guide Enforcement](https://flake8.pycqa.org/en/latest/)|
|pep8-naming|[Check your code against PEP 8 naming conventions](https://pypi.org/project/pep8-naming/)|
|black|[The uncompromising code formatter](https://black.readthedocs.io/en/stable/index.html)|
|matplotlib|[Visualization with Python](https://matplotlib.org/)|
|seaborn|[seaborn: statistical data visualization](https://seaborn.pydata.org/)|
|ipython|[IPython provides a rich architecture for interactive computing](https://ipython.org/)|
|jupyterlab|[JupyterLab is the latest web-based interactive development environment for notebooks, code, and data.](https://jupyter.org/)|
|mypy|[Mypy is an optional static type checker for Python that aims to combine the benefits of dynamic (or "duck") typing and static typing.](http://mypy-lang.org/")|
|dataclasses-json|[Easily serialize Data Classes to and from JSON](https://github.com/lidatong/dataclasses-json)|
|dataconf|[Simple dataclasses configuration management for Python with hocon/json/yaml/properties/env-vars/dict support](https://github.com/zifeo/dataconf)|
|ipympl|[Matplotlib Jupyter Integration](https://github.com/matplotlib/ipympl)|
|pywavelets|[PyWavelets is open source wavelet transform software for Python.](https://pywavelets.readthedocs.io/en/latest/)|
|scikit-learn|[Simple and efficient tools for predictive data analysis](https://scikit-learn.org/)|
|scikit-image|[Image processing in Python](https://scikit-image.org/)|
|opencv-python|[Open Source Computer Vision Library](https://opencv.org/)|
|tqdm|[A Fast, Extensible Progress Bar for Python and CLI](https://github.com/tqdm/tqdm)|
|argh|[Building a command-line interface?](https://pythonhosted.org/argh/) Found yourself uttering “argh!” while struggling with the API of argparse? Don’t want to lose its power but don’t need the complexity?|
|sympy|[SymPy is a Python library for symbolic mathematics.](https://www.sympy.org/en/index.html)|
|jsmin|[JavaScript minifier](https://github.com/tikitu/jsmin/)|
|pybind11|[Seamless operability between C++11 and Python](https://github.com/pybind/pybind11)|
|pybind11-stubgen|For mypy|
|pigar|[A tool to generate requirements.txt for Python project, and more than that.](https://github.com/damnever/pigar)|
|asciichartpy|[Nice-looking lightweight console ASCII line charts](https://github.com/kroitor/asciichart)|
|natsort|[Simple yet flexible natural sorting in Python.](https://github.com/SethMMorton/natsort)|
|ipykernel|IPython Kernel for Jupyter|


### PyTorch
<syntaxhighlight lang="shell">pip3 install torch torchvision torchaudio torchtext </syntaxhighlight>
===== NVidia GPU =====


[Check here](https://pytorch.org/get-started/locally/#start-locally) for a installation configurator.
<syntaxhighlight lang="shell">pip3 install torch torchvision torchaudio torchtext  --index-url https://download.pytorch.org/whl/cu121</syntaxhighlight>
==== Linux ====
===== CPU only =====


**Note: Even if you don't want to use TensorFlow, you want to install it too due to the tensorboard package.** Tensorboard allows to track the progress during learning.  
<syntaxhighlight lang="shell">cd /home/[YOURUSERNAME]/P3.12/bin
./pip3 install torch torchvision torchaudio torchtext --index-url https://download.pytorch.org/whl/cpu</syntaxhighlight>
===== NVidia GPU =====


#### Windows
<syntaxhighlight lang="shell">cd /home/[YOURUSERNAME]/P3.12/bin
./pip3 install torch torchvision torchaudio torchtext</syntaxhighlight>
{| class="wikitable"
|-
! Package
!
|-
| torch
| [https://pytorch.org/ PyTorch is a Python package that provides two high-level features: a. Tensor computation (like NumPy) with strong GPU acceleration b. Deep neural networks built on a tape-based autograd system]
|-
| torchvision
| [https://github.com/pytorch/vision The torchvision package consists of popular datasets, model architectures, and common image transformations for computer vision.]
|-
| torchaudio
| [https://github.com/pytorch/audio The aim of torchaudio is to apply PyTorch to the audio domain.]
|-
| torchtext
| [https://github.com/pytorch/text Models, data loaders and abstractions for language processing, powered by PyTorch]
|}
=== TensorFlow ===
==== Windows ====
===== CPU only =====


##### CPU only
<syntaxhighlight lang="shell">pip3 install tensorflow</syntaxhighlight>
===== NVidia GPU =====


```shell
<syntaxhighlight lang="shell">pip3 install tensorflow[and-cuda]</syntaxhighlight>
pip3 install torch torchvision torchaudio torchtext
==== Linux ====
```
===== CPU only =====


##### NVidia GPU
<syntaxhighlight lang="shell">cd /home/[YOURUSERNAME]/P3.12/bin
 
./pip3 install tensorflow</syntaxhighlight>
```shell
===== NVidia GPU =====
pip3 install torch torchvision torchaudio torchtext  --index-url https://download.pytorch.org/whl/cu121
```
 
#### Linux
 
##### CPU only
 
```shell
cd /home/[YOURUSERNAME]/P3.12/bin
./pip3 install torch torchvision torchaudio torchtext --index-url https://download.pytorch.org/whl/cpu
```
 
##### NVidia GPU
 
```shell
cd /home/[YOURUSERNAME]/P3.12/bin
./pip3 install torch torchvision torchaudio torchtext
```
 
|Package||
|---|---|
|torch|[PyTorch is a Python package that provides two high-level features: a. Tensor computation (like NumPy) with strong GPU acceleration b. Deep neural networks built on a tape-based autograd system](https://pytorch.org/)|
|torchvision|[The torchvision package consists of popular datasets, model architectures, and common image transformations for computer vision.](https://github.com/pytorch/vision)|
|torchaudio|[The aim of torchaudio is to apply PyTorch to the audio domain.](https://github.com/pytorch/audio)|
|torchtext|[Models, data loaders and abstractions for language processing, powered by PyTorch](https://github.com/pytorch/text)|
 
### TensorFlow
 
#### Windows
 
##### CPU only
 
```shell
pip3 install tensorflow
```
 
##### NVidia GPU
 
```shell
pip3 install tensorflow[and-cuda]
```
 
#### Linux
 
##### CPU only
 
```shell
cd /home/[YOURUSERNAME]/P3.12/bin
./pip3 install tensorflow
```
 
##### NVidia GPU
 
```shell
cd /home/[YOURUSERNAME]/P3.12/bin
./pip3 install tensorflow[and-cuda]
```


|Package||
<syntaxhighlight lang="shell">cd /home/[YOURUSERNAME]/P3.12/bin
|---|---|
./pip3 install tensorflow[and-cuda]</syntaxhighlight>
|tensorflow|[TensorFlow is an open source software library for high performance numerical computation. Its flexible architecture allows easy deployment of computation across a variety of platforms (CPUs, GPUs, TPUs), and from desktops to clusters of servers to mobile and edge devices.](https://www.tensorflow.org/)|
{| class="wikitable"
|-
! Package
!
|-
| tensorflow
| [https://www.tensorflow.org/ TensorFlow is an open source software library for high performance numerical computation. Its flexible architecture allows easy deployment of computation across a variety of platforms (CPUs, GPUs, TPUs), and from desktops to clusters of servers to mobile and edge devices.]
|}

Latest revision as of 15:41, 17 October 2025

Install your very own Python and keep everything under control.

Questions to David Rotermund

We need to download a suitable Python version from https://www.python.org. In the case we want to use PyTorch check here or TensorFlow check here we need to check if the Python version is okay.

Windows

I downloaded this file: https://www.python.org/ftp/python/3.12.7/python-3.12.7-amd64.exe

figure 1

Select “Add python.exe to Path” and then press “Install Now”.

We need to update pip first:

python.exe -m pip install --upgrade pip

ffmpeg

You might need to create mp4 files. E.g. for saving matplotlib animations

Thus you need ffmpeg binaries. You find them here: https://www.gyan.dev/ffmpeg/builds/

I went for https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-6.0-full_build.7z

There are differnt way to install the ffmpeg binaries (ffmpeg.exe, ffplay.exe, and ffprobe.exe). The easiest way is to put them here: %LOCALAPPDATA%

Linux

Please check the dependencies beforehand!!!

For Fedora:

Honestly, I didn’t get this depencency thing working. And I couldn’t find a solution. However, I am installing a huge amount of packages anyway such that the required stuff is part of it. :-)

sudo dnf install dnf-plugins-core  # install this to use 'dnf builddep'
sudo dnf builddep python3

Python installation (after the dependencies are solved):

mkdir PySource
cd PySource
wget https://www.python.org/ftp/python/3.12.7/Python-3.12.7.tgz
tar -xvzf Python-3.12.7.tgz
cd Python-3.12.7
./configure --prefix=/home/[YOURUSERNAME]/P3.12 --enable-optimizations
make -j 10
make install
cd /home/[YOURUSERNAME]/P3.12/bin
./pip3 install --upgrade pip

Bash (.bash_profile)

alias pyhton3=/home/[YOURUSERNAME]/P3.12/bin/python3
alias pyhton=/home/[YOURUSERNAME]/P3.12/bin/python3
alias ipyhton=/home/[YOURUSERNAME]/P3.12/bin/ipython
alias ipyhton3=/home/[YOURUSERNAME]/P3.12/bin/ipython
alias python3=/home/[YOURUSERNAME]/P3.12/bin/python3
alias python=/home/[YOURUSERNAME]/P3.12/bin/python3
alias ipython=/home/[YOURUSERNAME]/P3.12/bin/ipython
alias ipython3=/home/[YOURUSERNAME]/P3.12/bin/ipython
alias pip3=/home/[YOURUSERNAME]/P3.12/bin/pip3
alias pip=/home/[YOURUSERNAME]/P3.12/bin/pip3

And add /home/[YOURUSERNAME]/P3.12/bin to the export PATH= command.

Numba

{: .topic-optional} This is an optional topic!

The question is: Is numba broken in the moment or not? First we install numpy and then numba. We will observe if numba tried to change the numpy version.

Windows

pip install numpy
pip install numba

If so then you have to decide if you want to remove numba and the downgraded numpy version before continuing. I would remove it!

pip uninstall numpy numba

Linux

cd /home/[YOURUSERNAME]/P3.12/bin
./pip install numpy
cd /home/[YOURUSERNAME]/P3.12/bin
./pip install numba

If so then you have to decide if you want to remove numba and the downgraded numpy version before continuing. I would remove it!

cd /home/[YOURUSERNAME]/P3.12/bin
./pip uninstall numpy numba
Package
numba Numba is an open source JIT compiler that translates a subset of Python and NumPy code into fast machine code.

Basic Packages you want to install

Windows

pip3 install numpy scipy pandas flake8 pep8-naming black matplotlib seaborn ipython jupyterlab mypy dataclasses-json dataconf ipympl pywavelets scikit-image opencv-python scikit-learn tqdm argh sympy jsmin pybind11 pybind11-stubgen pigar asciichartpy natsort ipykernel

Linux

cd /home/[YOURUSERNAME]/P3.12/bin
./pip3 install numpy scipy pandas flake8 pep8-naming black matplotlib seaborn ipython jupyterlab mypy dataclasses-json dataconf ipympl pywavelets scikit-image opencv-python scikit-learn tqdm argh sympy jsmin pybind11 pybind11-stubgen pigar asciichartpy natsort ipykernel filelock importlib-metadata regex fsspec
Package
numpy The fundamental package for scientific computing with Python
scipy Fundamental algorithms for scientific computing in Python
pandas pandas is a fast, powerful, flexible and easy to use open source data analysis and manipulation tool
flake8 Your Tool For Style Guide Enforcement
pep8-naming Check your code against PEP 8 naming conventions
black The uncompromising code formatter
matplotlib Visualization with Python
seaborn seaborn: statistical data visualization
ipython IPython provides a rich architecture for interactive computing
jupyterlab JupyterLab is the latest web-based interactive development environment for notebooks, code, and data.
mypy Mypy is an optional static type checker for Python that aims to combine the benefits of dynamic (or “duck”) typing and static typing.
dataclasses-json Easily serialize Data Classes to and from JSON
dataconf Simple dataclasses configuration management for Python with hocon/json/yaml/properties/env-vars/dict support
ipympl Matplotlib Jupyter Integration
pywavelets PyWavelets is open source wavelet transform software for Python.
scikit-learn Simple and efficient tools for predictive data analysis
scikit-image Image processing in Python
opencv-python Open Source Computer Vision Library
tqdm A Fast, Extensible Progress Bar for Python and CLI
argh Building a command-line interface? Found yourself uttering “argh!” while struggling with the API of argparse? Don’t want to lose its power but don’t need the complexity?
sympy SymPy is a Python library for symbolic mathematics.
jsmin JavaScript minifier
pybind11 Seamless operability between C++11 and Python
pybind11-stubgen For mypy
pigar A tool to generate requirements.txt for Python project, and more than that.
asciichartpy Nice-looking lightweight console ASCII line charts
natsort Simple yet flexible natural sorting in Python.
ipykernel IPython Kernel for Jupyter

PyTorch

Check here for a installation configurator.

Note: Even if you don’t want to use TensorFlow, you want to install it too due to the tensorboard package. Tensorboard allows to track the progress during learning.

Windows

CPU only
pip3 install torch torchvision torchaudio torchtext
NVidia GPU
pip3 install torch torchvision torchaudio torchtext  --index-url https://download.pytorch.org/whl/cu121

Linux

CPU only
cd /home/[YOURUSERNAME]/P3.12/bin
./pip3 install torch torchvision torchaudio torchtext --index-url https://download.pytorch.org/whl/cpu
NVidia GPU
cd /home/[YOURUSERNAME]/P3.12/bin
./pip3 install torch torchvision torchaudio torchtext
Package
torch PyTorch is a Python package that provides two high-level features: a. Tensor computation (like NumPy) with strong GPU acceleration b. Deep neural networks built on a tape-based autograd system
torchvision The torchvision package consists of popular datasets, model architectures, and common image transformations for computer vision.
torchaudio The aim of torchaudio is to apply PyTorch to the audio domain.
torchtext Models, data loaders and abstractions for language processing, powered by PyTorch

TensorFlow

Windows

CPU only
pip3 install tensorflow
NVidia GPU
pip3 install tensorflow[and-cuda]

Linux

CPU only
cd /home/[YOURUSERNAME]/P3.12/bin
./pip3 install tensorflow
NVidia GPU
cd /home/[YOURUSERNAME]/P3.12/bin
./pip3 install tensorflow[and-cuda]
Package
tensorflow TensorFlow is an open source software library for high performance numerical computation. Its flexible architecture allows easy deployment of computation across a variety of platforms (CPUs, GPUs, TPUs), and from desktops to clusters of servers to mobile and edge devices.