How do I 'securely' download pip on Windows 7? - django

I want to install pip on Windows 7. On http://www.pip-installer.org/en/latest/installing.html#id6 it says that 'securely' download it. Not sure what does it mean. When I click on get-pip.py I am directed to a page https://raw.github.com/pypa/pip/master/contrib/get-pip.py with loads of binary data.

I want to install pip on Windows 7.
First, make sure you have installed an official supported version of Python; the most reliable way to do this is to install from the official windows installer page.
Next, navigate to this page and then search for pip and you will see Windows installer packages for different versions of pip that correspond to different versions of Python. Download the one that matches the version of Python you have installed.
Once the package is downloaded, double click it to install it just like any other Windows application.

https://raw.github.com/pypa/pip/master/contrib/get-pip.py is not a download page. It's a installation file. The doc is quite clear about that.
To install or upgrade pip, securely download get-pip.py. [1]
Then run the following (which may require administrator access):
python get-pip.py

Related

Cannot install "psycopg2" on Windows 10 with Python 3.8

Yesterday I uninstalled python 3.7 version by mistake. Then I install python again (this time 3.8 version) and again set up my environment. But I could not start my Django project which has Postgres connection. Actually I cannot install "psycopg2" in my environment. I searched for hours and implement every solutions I get from online but it does not work. Let me tell you what I did so far.
First it said to add Postgres in my PATH so I added C:\Program Files\PostgreSQL\12\bin\ in my PATH.
A new problem then arise with a huge ERROR report with 2 vital Error.
ERROR: Failed building wheel for psycopg2
..........................
Running setup.py install for psycopg2 ... error
I try to upgrade wheel but it says,
Requirement already up-to-date
http://initd.org/psycopg/docs/install.html#install-from-source
I learned from this site that psycopg2 requires python2 version. So I installed python 2.7 also.
I reinstalled PostgreSQL but it does not work.
I deleted my virtual environment and create again but it does not work.
Some says they solve this problem by running pip install psycopg2-binary But it does not work for me.
Please help me to get rid of this. I stuck for hours.
When you asked this question, Python 3.8 had been released very recently so there were not any wheels for Python 3.8 yet.
At the time, my suggestion was to install Python 3.7.X and install the binary wheel with:
pip install psycopg2-binary
Since then, binary wheels have been released for Python 3.8, so the above command should work with Python 3.8.X as well.
I wouldn't try to build from source on Windows if it can be avoided.
Finally, you misunderstood the section of the docs about Python 2. You only need Python 2.7 if you are running Python 2. For Python 3, which you should be using for all new projects, it currently supports Python 3.4 to 3.8.
use:
sudo apt install python3-dev libpq-dev
then try doing:
pip3 install psycopg2
Hope it works for you!!
This problem mainly occurs due to this -- " error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/"
Now to install psycopg2, first you need to install visual studio from Microsoft - https://visualstudio.microsoft.com/visual-cpp-build-tools/
now you need to install the c++ desktop development tool with all its default components selected.
After successful visual studio c++ desktop development kit installation, you can now install psycopg2 successfully in your machine.

Dysfunctioning of pip in installing python packages on Windows

I am trying to install a Python module - pyproj-1.9.5.1-cp27-cp27m-win32.whl using the Python package installer - pip. Since I use a version of Python 2.7.10, which comes bundled with ArcGIS 10.4.1, it is already preloaded with pip, as all versions 2.7.9 onwards are. To install the module, I opened the Command Prompt in the directory of the module and typed
pip install pyproj-1.9.5.1-cp27-cp27m-win32
to get the error, which I have written below:
Could not find a version that satisfies the requirement pyproj-1.9.5.1-cp27-cp27m-win32 (from versions:) No matching distribution found for pyproj-1.9.5.1-cp27-cp27m-win32
Since ArcGIS 10.4 comes bundled with Python 2.7.10, it is pre-installed with pip. Pip is a recursive acronym that stands for "pip installs packages" and is a package management system that is used to install software packages written in Python, which is pre-installed in Python version 2.7.9+. Therefore, to install pyproj, make sure that %PYTHON_HOME%\Scripts\ and C:\Python27\ArcGIS10.4 are added in the Path of Environmental Variables in System Properties. After that, run Command Prompt as an administrator and type pip install pyproj to install pyproj.

Fail to install Python 2.7.9 on a Windows google compute engine instance

I fired up a new Windows google compute engine instance. It's running Windows 2008 R2, service pack 1.
I download and try running the Python .msi installer for version 2.7.9, and it fails with this error:
There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor.
I see this error for both the 64-bit and the 32-bit installer.
Has anyone else seen it or know of a work-around?
I reproduced your issue and I found two workarounds:
You can install python 2.7.6 successfully without further action.
If you need python 2.7.9 you can install it deselecting pip from the install menu.
This seems to be related to this answer in another thread although in that case the issue is with version 3.4.
Install python EXCEPT "pip"
Run the python install msi again and select "change"
Select "pip" and install the pip
It would be works...
I think it is a priority problem into the msi package...the package seems to try to install the pip before installing python.exe. So, pip can not be installed...
I'm using Windows 8.1 64-bit. I had 2.7.11 installed and then I tried to install PIP as well via Chocolatey PIP package.
I think my installation had got messed up because I had tried to install Python 3.4 as well as Python 2.
Then I had deleted all the Python 2 and Python 3 files in an attempt to get rid of this.
What worked for me was:
Editing the Environment Variables both, System and User to remove any PYTHONHOME or PYTHONPATH variables
I also deleted the path I had to python2 in the PATH environment variable
Now (as mentioned in Python Issue 22329) after deleting the Environment variables you can go into 'Programs and Features', click on the Python 2.7.11 (64-bit) program and then click 'Repair' - this then worked as I would expect without error.
Now finally I was able to go into 'Programs and Features', click on the Python 2.7.11 (64-bit) program and then click 'Uninstall'.
Edit: I assume this is connected with this PYTHON_HOME answer to a problem with Python 3.4
It seems to be a dependency issue, please try to install "Microsoft Visual C++ 2008 SP1 Redistributable Package (x64)"

Installing EWSWrapper?

How to install ewswrapper for python off of their site on a windows, (sadly), 64 bit machine with python 2.7.
The Link to the site is here.
Thank you for your help.
The generally recommended way to install python packages is using a package manager like pip or (gasp) easy_install. However, there are a few exceptions like this one.
On Windows, there may be a pre-built package for you to download. In this case, the link is http://ewswrapper.lafiel.net/index.php?al3x_download=file&userid=PUBLIC&filepath=/PYTHON_Releases/_PYTHON_2012_02_09_EWSWrapper_v_0_2.7z.
You'll need to unzip the file with 7zip, and place the resulting directory in your site-packages path. You can locate your system's site-packages path by looking at this SO answer: How do I find the location of my Python site-packages directory?
Additionally, EWSWrapper will require a few dependencies that you should be able to get in pip.
pip.exe install python-ntlm suds
If you don't have pip, you can install it: How do I install pip on Windows?
Just so you know, this isn't the normal way a package is installed. Perhaps someone should let them know...

How can I install python-Orange on ubuntu 12.10

sudo apt-get install python-Orange
or
sudo apt-get install python-orange
doesn't work
sudo python setup.py install
sudo python setup.py build
is not working as well.
Can anyone help??
Python has two tools for easy installation of all programs that are listed on the Python Package Index, also known as PyPi: These are easy_install and pip. Both retrieve very recent versions of Orange (and of any other package that is updating its PyPi entry regularly).
I installed Orange on Ubuntu 12.04 (LTS) with
pip install orange.
You will see lots of log lines indicating that Pip is downloading and compiling Orange for you. Simply wait. When pip is ready, fire up python and try to import orange. If that works, quit python and try the GUI with python /usr/local/lib/python2.7/dist-packages/Orange/OrangeCanvas/orngCanvas.pyw (you probably want to create a shell alias or bash script for that one :-)
NOTE: on 12.04 I needed to first upgrade 'distribute' itself with sudo easy_install -U distribute but this was clearly indicated by pip.
https://pypi.python.org/pypi/Orange/2.6/
You need to extract the dowloaded tarball on that page to a folder and then change directory to that folder. Then the sudo python setup.py... instructions will work (but you should 'build' the application before you 'install' it).
go to the given link "https://pypi.python.org/pypi/Orange/2.6/"
download the package and extract the file
install with given command
python setup.py build
python setup.py install
note:- during installation make sure that your net is working because it downloads required packages. Also it may ask for C++ or gcc compilers while installing and could be terminate just read the errors care fully and install requires packages from the synaptic package manage in ubuntu.