IDLE doesn't recognise installed packages

Daniel Tangemann daniel at tangemann-plus.de
Thu Oct 26 22:12:34 EDT 2017


hi,
I had tried typing: "path-to-binary -m pip <args)" I also tired "path-to-binary -m pip <C:\Users\Daniel86\AppData\Local\Programs\Python\Python36\python.exe)". the error I get is: 'the system cannot find the mentioned file'
when I try: 'py -3.6 -c "import sys; sys.executable" ' I get the error: 'the command "py -3.6 -c" is either misspelled or could not be found'
[I've translated that error messages from german]
thanks again for the help

> Terry Reedy <tjreedy at udel.edu> hat am 26. Oktober 2017 um 21:35 geschrieben:
>
>
> On 10/26/2017 12:37 AM, Daniel Tangemann wrote:
> > ok, I did that. I noticed that this path: 'C:\\Users\\Daniel86\\AppData\\Local\\Programs\\Python\\Python36\\Lib\\idlelib' is missing when I run the python.exe without IDLE. how do I fix this?
>
> Having idlelib on the path or not should not make any difference for
> anything installed by pip. It is not even needed by IDLE, since IDLE
> imports its modules via Lib.
>
>
> > also I get a syntax error when I try that:
>
> What you try what? Post the entire traceback.
>
> > "To make sure you are running pip with the same binary
> > as IDLE, enter path-to-binary -m pip <args) on a command line.
>
> Your path-to-binary appears to be
>
> C:\Users\Daniel86\AppData\Local\Programs\Python\Python36\python.exe
>
> You should be able to replace that with
>
> py -3.6
>
> but try
>
> py -3.6 -c "import sys; sys.executable"
>
> to be sure.
>
> >> Terry Reedy <tjreedy at udel.edu> hat am 24. Oktober 2017 um 08:36 geschrieben:
> >>
> >>
> >> On 10/23/2017 10:23 AM, Daniel Tangemann wrote:
> >>> I've recently downloaded and installed python 3.6. (I had already also 2.7 and 3.2 on my computer) Initially pip was looking in the wrong directory to install to, so I changed that. then it had trouble installing matplotlib, so I decided to get rid of the older versions of python, which srewed things up even more. now scrips that I had written (in 3.6), that were running without errors before, aren't working anymore. I tried reinstalling python, and I tried the repair option multiple times as well. when I look into the python folder, I can see the modules that I have installed (and that I import into those scripts), but the IDLE doesn't see them! what's even more weird, is that "pip list" doesn't bring up anything but pip itself, while typing "pip install matplotlib" returns a message
> > that
> >>> it's already installed. how do I fix this?
> >>> cheers
> >>
> >> Recognition of installed packages is done by the python running IDLE and
> >> executing your import statements, by not IDLE. The only effect IDLE
> >> could have is any manipulation of sys.path.
> >>
> >> You can find the executable running IDLE with
> >>
> >>>>> import sys; sys.executable
> >> 'C:\\Programs\\Python37\\pythonw.exe'
> >>
> >> Find the sys.path being used with
> >>>>> sys.path
> >>
> >> If you run the same binary (minus the 'w' if present), you can find the
> >> sys.path used without IDLE. You can also test imports without IDLE in use.
> >>
> >> It is possible that you have more than one binary around, but I cannot
> >> tell from here. To make sure you are running pip with the same binary
> >> as IDLE, enter path-to-binary -m pip <args) on a command line. For
> >> instance, on windows, given the above
> >>
> >> path> C:\Programs\Python37\python.exe -m pip list
> >>
> >> --
> >> Terry Jan Reedy
> >>
> >> --
> >> https://mail.python.org/mailman/listinfo/python-list
>
>
> --
> Terry Jan Reedy
>
> --
> https://mail.python.org/mailman/listinfo/python-list



More information about the Python-list mailing list