Python Forum
How to use python 3.x instead of 2.x?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use python 3.x instead of 2.x?
#1
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.
Reply
#2
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.
Reply
#3
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
Reply
#4
Try this sudo apt-get install python3-pip
Reply
#5
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.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020