FAQ 456: Installation of Python pip on Ubuntu Linux
Question
How can I install Python pip for a dSPACE-supported version of Python on Ubuntu Linux?
Solution
Install the dSPACE software (currently Real-Time Testing or XIL API .NET) to get the dSPACE-supported version of Python. For instructions, refer to dSPACE Products for Linux.
The next steps depend on the installed dSPACE Release.
For dSPACE Release 2023-B, which supports Python 3.11 and Ubuntu 20.04, open a terminal and continue with the following steps:
Install the Debian package “testresources”.
sudo apt install python3-testresources
Install the latest pip for Python 3.11.
sudo python3.11 -m ensurepip --upgrade
You can now continue with the installation of other pip packages (for example, numpy).
python3.11 -m pip install numpy
You can now use it. For example:
python3.11 -c "import numpy; print(numpy.arange(1, 10))"
For dSPACE Release 2024-A, which supports Python 3.11 and Ubuntu 22.04, open a terminal and continue with these steps:
Install the Debian package “python3-pip”.
sudo apt install python3-pip
Update pip to its latest version for Python 3.11.
sudo python3.11 -m pip install pip --upgrade
You can now continue with the installation of other pip packages (for example, numpy).
python3.11 -m pip install numpy
You can now use it. For example:
python3.11 -c "import numpy; print(numpy.arange(1, 10))"
Tags
| Date | 2024-06-10 |
| Product | dSPACE Calibration API Package, Failure Simulation API Package, Platform API Package, Real-Time Testing |
| Information Type | Frequently Asked Questions |
| Information Category | Installation |
| dSPACE Release | 2024-A, 2023-B |