Take python 3.6.x for example. The last windows installer for python 3.6.x is 3.6.8: no more installers for 3.6x version that comes later (see https://www.python.org/downloads/windows/)
3.6.8 happens to be the last maintenance release of python3.6, I don't know if it is somehow related to not propose a package installer for windows but only sources.
Practical problem here: How should I proceed to install 3.6.12 on Windows?
Please don’t simply advice « Install 3.7 or 3.8, it is more recent ». I know that 3.6 is not the latest, but sometimes you have to stick with a particular version for support or compatibility.
Since I have to use 3.6.x, I am looking for the latest version available in this branch (currently 3.6.12) to still benefit from security patches.
This gives two path:
install 3.6.8 with MSI installer then upgrade to 3.6.12 from source,
install 3.6.12 from source.
What are the steps involved for option 1 or 2?
It is possible to create your own MSI installer from the source distributions at https://www.python.org/downloads/source/. This is what I did to install Python 3.6.12 on my Windows machine.
In each source distribution, the files at PCBuild/readme.txt and Tools/msi/README.txt provide guidance for how to build your own Python installer. If you have not built Python from source before on Windows, this may be a challenge to set up.
If you do not want to build the installer yourself, you can download unofficial installers from https://github.com/adang1345/PythonWindows. These are the installers that I built recently as part of a personal project.
After looking at this question I would suggest or advise you should download and install the latest version instead (python 3.8). it would save you some stress and the pain of having to download a higher version later on.
Thank you.
Related
I'm developing a website using a server with Debian 8.10 (Jessie) as its OS and Python 3.4.2 (the supported Python version for Debian Jessie) while my notebook is using Ubuntu 16.04 and Python 3.5.2 (I think it's also the default version for Ubuntu 16.04). I was planning to build my website using Django 1.11 which both Python versions (3.4 and 3.5) support.
Is there any compatibility issues when I develop it using my Python 3.5.2 and deploy it to a Python 3.4.2 server? If any, how much the trouble it will be?
I know I can install any version of Python by adding someone's repository, but it seems unofficial so I avoid doing it. And there is a workaround that come to my mind: intall a specific version of Python by download its tarball file from the official website
Which will you recommend most?
Upgrade my server's Python version to 3.5.2 by adding someone's repo
Download Python 3.4.2's tarball and install it to my local machine
Upgrade my server's OS to Debian 9 Stretch which its default Python version is 3.5.3
Or any other better idea? Or perhaps you have a way to install specific Python version?
*I have some concern on security and safety
When you are working with different Python versions, it is recommended that you use some kind of virtual environment so each project has its own python version with its own modules that you need.
In this way, you can always keep each project with the Python version that you know it will work and with total compatibility with all the modules that you are using, making sure that any update to your working modules does not break anything in your past projects.
You should install a virtual environment in your local machine that matches the server machine and match the Python version and the modules that you have available, then start developing from there.
This space is a little bit too short to explain how to work with them, but you can find information about them here: https://docs.python.org/3/tutorial/venv.html
Optionally, you could use anaconda and its own version of enviroments, that may be simpler if you are familiar with conda
I've been looking around the internet for days now and cannot find a solution to my problem. I've learned all the basics to programming in Python 2.7 and I want to add Pip to my copy of 2.7. I found the link to download the unoffical 64-Bit installer (www.lfd.uci.edu/~gohlke/pythonlibs/), but when I downloaded it and ran it, it said I needed to have Python 2.7 (which I do) and it couldn't find it in the registry. I went to Pip's website and downloaded the official Windows installer and unpacked it using WinRAR.
I then tried opening Command Prompt and changed the directory to where the get-pip.py is located and running get-pip.py install but it says it failed to install.
I am completely lost and really need detailed and clear help. Please answer!
It doesn't matter what kind of machine you have. You can run 32-bit Windows on a 64-bit machine. And you can run 32-bit Python on 64-bit Windows.
If you have 32-bit Python, you need to install 32-bit pip. (Or you need to switch to 64-bit Python.)
From your description, you most likely have 32-bit Python on 64-bit Windows, and tried to use a 64-bit pip.
PS, if you want to install it manually instead of using Gohlke's installer, nobody can help you debug your problem based on "it says it failed to install". It produces a lot more output than that, and without that output, it's impossible to know which of the billion things that could possibly go wrong actually did.
PPS, just installing pip is sufficient to install any pure-Python packages. But if you want to install packages that include C extensions, you will need to set up a compiler (either MSVC, or MinGW/gcc), as explained in the pip documentation.
I want to use the cygwin installer to get a newer version of python3. I downloaded the latest cygwin setup tool (x86 32 bit) from http://cygwin.com/install.html. When I look at packages to install, the current python3 is listed as 3.2.3-1 and I already have this version installed.
Edit: I checked https://cygwin.com/packages/ and it appears that 3.2 is indeed the latest version available. If I can't use the cygwin installer, is there a way to get python3.4 on my cygwin file system that isn't too hacky?
As of today, you're stuck. I only see 3.2 as well. There's nothing stopping you from building/installing a later python into Cygwin as you would into any other *nix.
There was some chatter, but no answer, here about installing python 3.3 into Cyg that may get you started.
Edit (June 2015) Python 3.4.3 is now available via cygwin package installer.
I have downloaded the two releases of python 2.6.8 from here http://www.python.org/getit/releases/2.6.8/ and I don't know how to install that on my Windows 7 64bit OS. Please someone help me. I searched but I can't find good tutorial.
Thanks!
2.6.8 is a source only release. Download either 2.6.6 or 2.7.3 depending on your requirements, which come with Windows installers.
If you want to install Python 2.6.8 on a Windows machine, you can do the following:
If you don't have Microsoft Visual Studio, install it: the Express edition is available here: http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-products
Unzip your source code to a folder (lets call it E:\Python) and open E:\Python\PCbuild\pcbuild.sln in Visual Studio.
Set your build configuration to Debug for Win32 (available under Build => Configuration Manager.
Build your solution. You should see errors, these are related to modules for which patches were released such as zlib and sqlite. Fixing those is a little outside my expertise regarding a Python Windows install but there are patches available as I've resolved some of them on my Unix builds.
In any case, there should now be a python_d.exe file in your E:\Python\PCbuild folder. This is your Python executable.
I would like to install python3 with lxml on windows 7.
There seems to be several versions available.
What's the best version/way to install?
By best I mostly mean the easiest.
Points if I don't have to compile anything.
I had the same problem locating the correct version. After several hours of confusion I finally found the windows binary for Python 3 at Christoph Gohlke's Unofficial Windows Binaries for Python Extension Packages website at UC, Irvine.
He truly has the A-Z of Python extensions, as long as it's available for Python. Anything one could want from the PIP installer to Chinese word segmentation, to a multi-taper Fourier spectral estimator. Beyond that it gets into biologic & scientific specialty extensions.
Use the current stable version of 3, 3.2.2. You can find a windows installer here http://python.org/ftp/python/3.2.2/python-3.2.2.msi that will install python for you.
Use the Python Package Index version of lxml: it has a windows installer specifically for Python 3.
http://pypi.python.org/packages/3.1/l/lxml/lxml-2.2.8.win32-py3.1.exe#md5=d1fb73a8596bb77e155cef7ae6b0bc53
Download and run the Python installer then download and run the lxml installer: it should be that easy.
No compilations and IMHO, the best way:
Mainly because the instructions below the most complete and still FAST to complete. On more than one occasions, using just the MSI and the LXML binaries, I've run into issues with the install breaking/getting gcc and mingw errors.
These instructions are for Windows7 or Windows8 with Python3.3.
However, they should work for various versions as the releases of python and other respective prerequisites change/evolve:
Install Python3.3:
Download the last release of Python3.3 (currently 3.3.5) from the downloads page HERE
Direct link for Win32 MSI installer -> HERE
Direct link for Win64 MSI installer -> HERE
Simply run the MSI to install python. It will register itself in the registry, and appear in Add/REmove Programs.
NOTE: my instructions that follow assume that you choose to install python to the default path of C:\python33\ when asked during the Python Installation Wizard
Add the C:\python33\ and C:\python33\scripts folders to the system path by adding those directories to the PATH environment variable from the Control Panel > System > Advanced System Settings link (Advanced Tab) > Environmental Variables (Button).
(OPTIONAL) Install OpenSSL:
Download Win32 OpenSSL page from HERE for your version of Windows and PC architecture
Download Visual C++ 2008 redistributables for your version of Windows and PC architecture
Download OpenSSL for your version of Windows and architecture (the regular version, not the light one)
Add the following (depending on your architecture) directory (or wherever you insalled to) to your PATH, the same way you added C:\python33 and C:\python33\scripts above:
32-bit: c:\openssl-win32\bin
64-bit: c:\openssl-win64\bin
Install Setuptools (get-pip.py should install Setuptools for you), but, just in case...
Download ez_setup.py HERE and save it in C:\python33\scripts
Run C:\python33\scripts> python ez_setup.py
Install PIP
Download get-pip.py from HERE and save it in C:\python33\scripts
Run C:\python33\scripts> python get-pip.py
Install LXML
Download LXML 3.3.3 from HERE for your version of Windows and PC architecture
Run the EXE file
The latest version of lxml (3.6.0) now supports the Wheel format, so there is no problem with installing it with pip:
pip install lxml
Worth noting that Python3 is only supported on Windows 7 up to version 3.8.6 - beyond that it fails to install with an error similar to the following in the Python log file:
[2490:291C][2020-11-14T14:22:21]e000: Windows 8.1 or later is required to continue installation
This is mentioned in the Python Releases for Windows download page:
Note that Python 3.9.0 cannot be used on Windows 7 or earlier.
[...]
Note that Python 3.8.6 cannot be used on Windows XP or earlier.
Hence if installing with Chocolatey, the following command is needed:
choco install python3 --version 3.8.6