problems installing pylab

Terry Reedy tjreedy at udel.edu
Tue Feb 21 13:40:39 EST 2017


On 2/21/2017 10:47 AM, Robert William Lunnon wrote:

> I am trying to install pylab alongside python 3.6.

On Windows 10 as you said at the bottom.

> However when I type
>
> python -m pip install pylab

Try

py -3.6 -m pip install pylab

The '.6' should not be needed, but will make the command fail if you 
another 3.x but not 3.6.

> I get the message
>
> No module named site

If any python.exe ran, /Lib/site.py should be present and you should not 
see that.  What happens if you enter just 'python'?

> In the documentation [documentation for installing python modules in
> python 3.6.0 documentation] it says: The above example assumes that the
> option to adjust the system PATH environment variable was selected when
> installing python.

In most cases, one is better to just use the py command on Windows.  If 
there is only one python.exe installed

 >py

will start it.  If multiple pythons are installed, the latest is the 
default but you can use the flags to select -2 or -3 to select the 
latest of each or -x.y to select a specific version that is not the 
latest of the x series.  (I still type 'python' (now for 3.6) because a) 
it works since I made the install selection, and b) 20 years of habit ;-).)

> How do I do this? I am running Windows 10

You can repair or replace the existing install, but I don't suggest it.

-- 
Terry Jan Reedy




More information about the Python-list mailing list