Python Forum

Full Version: How to use python 3.x instead of 2.x?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have Linux Mint and python 3.6 already installed.
If I call "python" , Python 2.7.15 is called. If I call with -3, is the same and option -2 is not recognised.
You can't remove python 2 from linux, but try 'python3 command' should work.
You can write python3 --version and you will see vers of python 3, if you run python --version you should see python 2.
I have installed python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose
but still
Quote:$ python3 main.py
Traceback (most recent call last):
File "main.py", line 9, in <module>
import numpy as np
ModuleNotFoundError: No module named 'numpy'
If I try python3 pip:
Quote:$ python3 -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose
/usr/bin/python3: No module named pip
Try this sudo apt-get install python3-pip
Try
python3 -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose
If your default python is python 2, remember to use the python3 command every time.