javapopla.blogg.se

Python how to install matplotlib
Python how to install matplotlib















If you close your Terminal or restart your machine, the environment is deactivated. When an environment is activated the shell prompt is temporarily changed to show the name of the active environment. In order to be able to use the virtual environment, you’ll need to activate it: 1 source work3.7/bin/activate The above command will create a new folder named work3.7 in which you will have a fresh Python 3.7 virtual environment.

Python how to install matplotlib install#

Let’s follow best practices and create a virtual environment in which we will install NumPy, SciPy and Matplotlib: 1 python3.7 -m venv work3.7 So, use python3.7 when you want to use the latest version. Please note that python3 will invoke the default system Python which is 3.6. Let’s install the 3.7 version, this will be installed separately and won’t mess up your default Python version: 1 sudo apt install python3.7 python3.7-dev python3.7-venvĪt this point, you can invoke the newly installed Python 3.7 with: 1 python3.7 Fortunately, Ubuntu 18.04 also provides Python 3.7.3 as a separate install. The problem with the default Python installation is that it is a bit old. The above command will install support for using virtual environments, the pip3 package manager that can be used to install various libraries and Tkinter support for GUI programming with Python. Let’s install some of these in order to make our Python system more complete: 1 sudo apt install python3-venv python3-pip python3-tk On Ubuntu, the default Python 3 installation is split into a number of separate packages.















Python how to install matplotlib