Python Forum
Relations between python 2.7 3 3.7, scipy, pip?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Relations between python 2.7 3 3.7, scipy, pip?
#2
(May-05-2019, 03:58 AM)larkypython Wrote: And then I installed python3.7 through ppa, and I need to run it with
Look at pyenv Simple Python Version Management
(May-05-2019, 03:58 AM)larkypython Wrote: Do I need to install pip for each version of python?
Do I need to install scipy, numpy for each version of python?
Yes to both.
Example see that both python and pip command point to 3.7.
Then will only install to 3.7.
# Check "python" command if point to python 2,try "python3"
tom@tom-VirtualBox:~$ python -V
Python 3.7.3

# Check "pip" command,if point to 2 "pip3"
tom@tom-VirtualBox:~$ pip -V
pip 19.0.3 from /home/tom/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pip (python 3.7)

# Install scipy,see that numpy also automatic will be installed 
tom@tom-VirtualBox:~$ pip install scipy
Collecting scipy
  Downloading .......
Installing collected packages: numpy, scipy
Successfully installed numpy-1.16.3 scipy-1.2.1

# Test that it work
tom@tom-VirtualBox:~$ python
Python 3.7.3 (default, Apr 17 2019, 11:23:54) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
>>> scipy.__version__
'1.2.1'
>>> exit()
Reply


Messages In This Thread
RE: Relations between python 2.7 3 3.7, scipy, pip? - by snippsat - May-05-2019, 06:39 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Appropriate data-structure / design for business-day relations (week/month-wise) sx999 2 2,950 Apr-23-2021, 08:09 AM
Last Post: sx999
  ModuleNotFoundError: No module named 'scipy.optimize'; 'scipy' is not a package AaronKR 1 10,594 Jul-09-2020, 02:36 AM
Last Post: bowlofred
  Python scipy odeint: solving with solution-dependent functions etienne 0 2,870 Jun-05-2020, 01:29 PM
Last Post: etienne
  Path to python, matplotlib, scipy, numpy, etc. dcollett 6 3,115 Mar-29-2020, 07:59 PM
Last Post: dcollett
  How to plot implicit functions (with two variables) in scipy python using matplotlib? Jay_Nerella 1 8,110 May-11-2019, 01:17 AM
Last Post: scidam

Forum Jump:

User Panel Messages

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