f



just started

Hi everybody, I have just installed python 3.5.2 (downloaded from https://w=
ww.python.org/) on my mac (El Capitan).=20

1) I see from command line that older version of python are already availab=
le on my machine (python, python2.6, python2.7, python3, python3.5). I gues=
s some might have been installed as part of Xcode (?) or via macport (? des=
pite I never explicitly asked for python).

2) if I wish to install extra libraries, in particularly SciPy, what's best=
 way of doing it? From command line I see the following commands: pip3 and =
pip3.5. I guess pip3.5 is for python3.5 ? Can I use pip3 and pip3.5 interch=
angeably, or pip3 will only install things for python3, and not 3.5?

Are all these command equivalent?

pip3 install --user numpy scipy matplotlib
pip3.5 install --user numpy scipy matplotlib

python3.5 -m pip install numpy scipy matplotlib


3) I also see this command to install it from macport, although not sure it=
 will be ok given I didn't install python3.5 via macport but from downaload=
ed package?

sudo port install py35-numpy py35-scipy py35-matplotlib py35-ipython +noteb=
ook py35-pandas py35-sympy py35-nose

Thanks! I'm going through a very confused start, with too many version and =
too many commands to guess the right way of doing.

M
0
metal
12/16/2016 4:29:24 AM
comp.lang.python 77058 articles. 3 followers. Post Follow

3 Replies
152 Views

Similar Articles

[PageSpeed] 52

On Fri, Dec 16, 2016 at 3:29 PM,  <metal.suomi@gmail.com> wrote:
> 2) if I wish to install extra libraries, in particularly SciPy, what's be=
st way of doing it? From command line I see the following commands: pip3 an=
d pip3.5. I guess pip3.5 is for python3.5 ? Can I use pip3 and pip3.5 inter=
changeably, or pip3 will only install things for python3, and not 3.5?
>
> Are all these command equivalent?
>
> pip3 install --user numpy scipy matplotlib
> pip3.5 install --user numpy scipy matplotlib
>
> python3.5 -m pip install numpy scipy matplotlib

In theory, "pip3" will install into the default "python3", whichever
that is. However, in practice, it's entirely possible that it installs
into a very different Python from the one you're expecting. The most
reliable form is the latter; whatever command you use to start Python,
add "-m pip" to it, and you know you're talking to that same
installation.

ChrisA
0
Chris
12/16/2016 4:55:53 AM
> In theory, "pip3" will install into the default "python3", whichever
> that is. However, in practice, it's entirely possible that it installs
> into a very different Python from the one you're expecting. The most
> reliable form is the latter; whatever command you use to start Python,
> add "-m pip" to it, and you know you're talking to that same
> installation.

thanks! very clarifying. One more question though: after installing python3.5 I only have pip3 and pip3.5 from the command line. However, I issued the command 

python3.5 -m pip install matplotlib

and it all went like a charm. At the end of the install, it said "You are using pip version 8.1.1, however version 9.0.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command"

However, the command 
pip install --upgrade pip' command
doesn't work. So, it seems like pip is not installed. which pip3.5 tells me
/Library/Frameworks/Python.framework/Versions/3.5/bin/pip3.5

so I'm confused. I have only pip3.5 and the command python3.5 -m pip install .... automatically translates into pip3.5 ? 
0
metal
12/19/2016 1:20:48 PM
On Mon, 19 Dec 2016 at 13:20 <metal.suomi@gmail.com> wrote:

> thanks! very clarifying. One more question though: after installing
> python3.5 I only have pip3 and pip3.5 from the command line. However, I
> issued the command
>
> python3.5 -m pip install matplotlib
>
> and it all went like a charm. At the end of the install, it said "You are
> using pip version 8.1.1, however version 9.0.1 is available. You should
> consider upgrading via the 'pip install --upgrade pip' command"
>

I think this is a minor bug in pip. It should probably suggest running pip
in the same way that it was called.


> However, the command
> pip install --upgrade pip' command
> doesn't work. So, it seems like pip is not installed. which pip3.5 tells me
> /Library/Frameworks/Python.framework/Versions/3.5/bin/pip3.5
>
> so I'm confused. I have only pip3.5 and the command python3.5 -m pip
> install .... automatically translates into pip3.5 ?
>

Actually it's the other way around. The `pip3.5` (and `pip3`) commands both
map to (effectively) `python3.5 -m pip`. You can see this if you run `cat
$(which pip3)`.
-- 

--
Matt Wheeler
http://funkyh.at
0
Matt
12/19/2016 3:00:00 PM
Reply: