Thanks to visit codestin.com
Credit goes to github.com

Skip to content

So... how to work with WinPython 2.7 on Windows #540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TijmenWB opened this issue Jun 9, 2017 · 3 comments
Closed

So... how to work with WinPython 2.7 on Windows #540

TijmenWB opened this issue Jun 9, 2017 · 3 comments

Comments

@TijmenWB
Copy link

TijmenWB commented Jun 9, 2017

Hey guys,

New to Python here. I started installing Python, because I wanted to run someone else's Python code. I installed Python 3.6, but noticed that the codes I had to run were written in Python 2 (very convenient), as all of the print statements gave errors. I initially adapted it, but found that there were shadow scripts with the same problems, so that is why I wanted to switch to Python 2.

I installed Python 2 on my Windows 10 system. It took a while to get everything to work. when everything was fine and the IDLE controller could read the script, I included all of the required packages one by one via pip, but I noticed that it was impossible to add scipy on Windows.

That is when I shifted to Winpython. I installed WinPython on a portable USB-drive. WinPython 3.6 is running fine, but I also installed 2.7.13 Zero. However, I cannot open or start anything from this folder.

I know that this problem has been flagged before and tried the solution of installing PyQt4. I think that it is kinda odd that you have to do this, because I thought that one of the reasons WinPython was created, was to to have an easy entrance to the available modules.

I installed: PyQt4-4.11.4-cp27-cp27m-win32.whl and ran it from the Windows Command Prompt, but I still cannot get Spyder to start (nothing happens).

Is there a quick work around for me to work with Python 2.7 and scipy on my Windows computer? All of this is getting a bit on my nerves. I have been wasting all this time and feel like a total dork for not getting it to work and running into new problems every single time . XD

Thank you!

@hiccup7
Copy link

hiccup7 commented Jun 12, 2017

When using WinPython 2.7.x Zero, I recommend getting packages from http://www.lfd.uci.edu/~gohlke/pythonlibs/ as the first choice. Python 2.7 is so old now and harder to learn than Python 3.x, I suspect that Python 2.7 is the least convenient way to proceed.

But if you are prepared for the inconvenience, the last full WinPython 2.7.x is here:
https://sourceforge.net/projects/winpython/files/WinPython_2.7/2.7.10.3/
It is at least more convenient than loading all those packages.

I am concerned that Python 3.6 and packages I use are more buggy than with Python 3.5, so I am still on Python 3.5. This is something to keep in mind if you run into problems with Python 3.6.

@ghost
Copy link

ghost commented Sep 21, 2019

FYI
NodeJS' npm still asks for 2.7.x and won't work with 3.x,
so after you've download the latest 2.7 from https://sourceforge.net/projects/winpython/files/WinPython_2.7/
and extract its content to your PC (in my case it was simply under C:\Python),
you need to make sure that this version will be preferred over others,
which you can do by placing few of its folders first in the PATH environment variable.

For a CMD/BAT script you can temporarily do:

::this will make sure your versions of Python will first be used when any batch file looks for 'python.exe' .
set "PATH=C:\Python;C:\Python\python-2.7.13;C:\Python\python-2.7.13\Scripts;%PATH%"

::check it by using 'where'
where python.exe
::you'll get 'C:\Python\python-2.7.13\python.exe' first (and any other versions, if any, afterwards).

pause

In-case you're actually using this Python as your main one,
you should probably set the PATH environment variable for the whole machine,

right click 'computer' in start menu, properties, advanced system settings, environment variables button, under 'system variables' frame (the second frame, below) - edit PATH (best to do in a notepad then copy/paste back):
remove old Python related entries, and add yours (mine..): C:\Python;C:\Python\python-2.7.13;C:\Python\python-2.7.13\Scripts; at the end. If you remove old Python paths you don't need to worry about where to add those values (but if you wish to keep old entries, just paste those values before them, make sure to separate entries with ; ).

setting the PATH is all you need,
a reboot of the machine is required (or ending and re-opening explorer.exe and cmd.exe).

@stonebig
Copy link
Contributor

stonebig commented May 4, 2025

python-2.7 is way out of support, now

@stonebig stonebig closed this as completed May 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants