How do I install python_ldap on 64 bit windows 7? - python-2.7

I'm using python 2.7.6 and in my code I have a line:
import psycopg2.extensions
which I've installed using pip. Next, my editor tells me, that psycopg2 requires python_ldap=2.4.19.
However, in the PyPI repository, there's only a 32 bit version, which doesn't work, since my Windows is 64 bit.
There's a 64 bit version of python_ldap=2.4.28, avaliable here, however running
pip install python_ldap-2.4.28-cp27-cp27m-win_amd64.whl
in the windows command line returns
python_ldap-2.4.28-cp27-cp27m-win_amd64.whl is not a supported wheel on this platform.
in red, which I guess is an error meassage.
So, in the end, what should I do to have the package installed on my laptop?

For anyone who's facing this, I solved this problem by installing the wheel from http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-ldap.
Cheers.
EDIT: I did this on a 64 bit Windows 10 machine, but I presume the same solution applies to Windows 7.

$ python --version
Python 3.6.0
pip install --only-binary :all: python_ldap-3.1.0-cp36-cp36m-win_amd64.whl
Make sure you choose the .whl file version matching the python install version
pip install --only-binary :all: python_ldap-3.1.0-cp36-cp36m-win_amd64.whl
Processing c:\users\sthomas05\downloads\python_ldap-3.1.0-cp36-cp36m-win_amd64.whl
Requirement already satisfied: pyasn1>=0.3.7 in c:\users\sthomas05\appdata\roaming\python\python36\site-packages (from python-ldap==3.1.0) (0.4.5)
Requirement already satisfied: pyasn1-modules>=0.1.5 in c:\users\sthomas05\appdata\roaming\python\python36\site-packages (from python-ldap==3.1.0) (0.2.4)
Installing collected packages: python-ldap
Successfully installed python-ldap-3.1.0

As mentioned on the official website the unofficial package from on Christoph Gohlke’s page should work.
Latest update is from 3rd of July, so it seems to be pretty up to date.

Related

scipy installation in windows 10 using pip

From the past two days, I've been trying to install scipy from the wheel file available from http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy in my windows laptop 64 bit built and running Python 2.7.3. I tried running pip install scipy in the command window, it didn't work and the following error popped up in command prompt
and
I also tried typing
pip install scipy-version.whl
That didn't work too! and the same error popped up. I even updated my pip.
I read in some comments that pip doesn't work well for scipy installation. If so, what alternatives can you suggest? If not can you tell me the way to install using wheel scripts?
There are some issue while installing scipy using pip, please try using Anaconda python version which comes with all the libraries you can ever need instead of your default python.
Still if you want to use the default python refer here, as already answered here.

pip install for whl files

I am trying to install scipy package for python 2.7 in windows,
The process i followed is as follows:
downloaded a whl file scipy-0.17.1-cp27-cp27m-win32.whl from
http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
tried to install by
pip install scipy-0.17.1-cp27-cp27m-win32.whl
error : Requirement 'scipy-0.15.1-cp27-none-win32.whl' looks like
a filename but the file does not exist
scipy-0.15.1-cp27-none-win32.whl is not a supported wheelon this platform.
then tried to install by
pip install file_location\scipy-0.17.1-cp27-cp27m-win32.whl.
error displayed :scipy-0.15.1-cp27-none-win32.whl is not a supported wheel on this platform.
Also i have already upgraded my pip command.
Can anyone suggest me out some valid solutions?
I Think the issue in Python interpreter variant 32 or 64.. if your python is 32-bit then use scipy-0.17.1-cp27-cp27m-win32.whl otherwise if your python is 64Bit then try scipy-0.17.1-cp27-cp27m-win_amd64.whl

How do I open a .whl binary installation file in CMD? Win Py 2.7 Err "No distributions at all found for lxml-3.4.4-cp27-none-win32.whl"

I've been at this for nearly 2 hours and I just can't seem to get my head around it. I am a novice Pythoner, it would appear. I am trying to intsall lxml, (needed to install scrapy). I have tried multiple methods (see my other current quesitons).
Currently I am trying the following.
I downloaded the lxml win 32 file for python 2.7 from this website:
https://pypi.python.org/pypi/lxml/3.4.4#downloads
The LXML Binaries are also available here: "http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml"
I download the .whl file.
I then open up CMD, and CD to my download folder. Once in that folder I run the following command (as per the answer to this question here: How do I install a Python package with a .whl file?)
pip install lxml-3.4.4-cp27-none-win32.whl
This is the output:
C:\Users\Charles\Downloads\python>pip install lxml-3.4.4-cp27-none-win32.whl
Downloading/unpacking lxml-3.4.4-cp27-none-win32.whl
Could not find any downloads that satisfy the requirement lxml-3.4.4-cp27- none
-win32.whl
No distributions at all found for lxml-3.4.4-cp27-none-win32.whl
Storing complete log in C:\Users\Charles\AppData\Roaming\pip\pip.log
Can anyone help me figure out what this means/what is going on? How can I execute this file to install the lxml as needed?
Many thanks!!
Edit: I am using Windows 64 bit, but from this question here: "easy_install lxml on Python 2.7 on Windows" the file I have selected appears to be the correct one.
I am using Windows 64 bit and use Scrapy. It took a while for me to figure out the best way to set up my virtualenv because lxml would not simply pip install.
So I did somethine very similar to what you did but it looks at first glance we may just be using different sites. So try downloading this .whl from HERE. Specifically, for your specifications I believe, grab the one that reads
lxml-3.4.4-cp27-none-win_amd64.whl
and then just cd to the downloads folder and pip install lxml-3.4.4-cp27-none-win_amd64.whl
The first thing you should do is upgrade pip; the latest version is 8.0. Next, you need to install wheel support (this step may be redundant in later versions) and then finally install your wheel:
pip install --upgrade pip
pip install wheel
lxml needs a lot of source-level dependencies, which are difficult to install in Windows. This is why the project provides binary installers for Windows. You can download these from the pypi page for lxml. Make sure you choose the right version for your environment:
lxml-3.4.4.win32-py2.7.exe - for Python 2.7 running on Windows 32-bit
lxml-3.4.4.win32-py3.2.exe - for Python 3.2 running on Windows 32-bit
lxml-3.4.4.win-amd64-py2.7.exe - for Python 2.7, running on Windows 64-bit

lapack/blas-related error when trying to add scipy to miniconda-installed copy of python 2.7.10 on RedHat 6

I have two versions of python on my RedHat 6 machine: 2.7.8 that came with the system originally and 2.7.10 that I've installed using miniconda for a project. I have to use the newer version to run some demo code for another project. The demo script produced this error:
ImportError: No module named scipy.sparse
Running pip install scipy failed with a bunch of warnings and then this:
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
numpy is already installed. That is, I get Requirement already satisfied when trying to pip install numpy.
The yum install command recommended on the SciPy install page completed fine but did not help, probably because this python version is installed at a non-default location.
Same result after building blas and lapack from source as described here
How do I get scipy to install properly?
Thx
I think you don't have lapack/blas library.
try this.
yum install python-devel python-nose python-setuptools gcc gcc-gfortran gcc-c++ blas-devel lapack-devel atlas-devel
it will install all what you need.
If you use Anaconda/miniconda, then use the conda package manager, not pip:
conda install scipy.
Value of a Peace of mind once starting always from a [Defined state]
There are many issues with pip / yum installer strategies that we, mortals, can spend ages on our attempts to get resolved.
Since I started to use the Travis Oliphant's Anaconda fully-fledged package-manager, these dependency-related / version-colliding issues simply disappeared. Well did not disappear, but principally do not appear.
Why?
Anaconda package-manager both allows one to keep separate versions ready / reconfigurable via Anaconda for individual python launches
and
Anaconda resolves updates in a smart way, one would never experience with manual/semi-manual pip/yum installers
In other words, if you strive to get rid of issues, opt to install Anaconda and start using it's (parallel) multi-versions installation / setup controls and it's smart package-manager facilities.
n.b.: this is not a commercial/spam/PR, this is just personal experience after many years of troubles with individual package updates' collisions / compatibility back-testing troubles in multi-py 2.5 / 2.6 / 2.7 installations environments

Matplotlib install issues. Pip Centos - Freetype "Missing" when it is installed

I am using a virtualenv for a django setup. I am trying to build a view that pulls data from logs and then graphs the data. Eventually I would like to have this real-time and live. If you have any recommendations on other solutions that would suit my project best, please do not hesitate to include them in the comment fields below.
I have attempted to install matplotlib from pip using pip install matplotlib.
I receive the following message:
* The following required packages can not be built:
* freetype
I then validated that it was installed
yum install freetype
Package freetype-2.3.11-14.el6_3.1.x86_64 already installed and latest version
I then found that there is a python-matplotlib which is an older version .99. However, I want to keep this inside of the virtual environment and not system wide.
find / -name *freetype*
/var/lib/yum/yumdb/f/d2807dcfe3762c0b9f8ef1d9bf0f05788e73282a-freetype-2.3.11-14.el6_3.1- x86_64
/usr/lib64/libfreetype.so.6.3.22
/usr/lib64/libfreetype.so.6
/usr/share/doc/freetype-2.3.11
I searched all over stackoverflow and only saw solutions for ubuntu which did not transfer over to centos.
Thank you for your time,
John
pip is going to compile matlibplot on your local machine, so you'll need freetype development headers installed as well.
CentOS 6+, Fedora, etc.:
$ sudo yum -y install freetype freetype-devel libpng-devel
On older operating systems (e.g. CentOS 5), you may run into a more specific freetype versioning issue with newer releases of matlibplot. If you're version agnostic, sticking with a legacy 1.3.x release will negate these dependency issues:
$ pip install matplotlib==1.3.1
Please note, you may need to downgrade your numpy to 1.8 in order to make matplotlib 1.3 work.
$ pip install numpy==1.8
Good luck!
I have just had a similar (albeit not exactly the same) situation. I'll write it up here as this page comes up among the first search results.
CentOS 5
pip install matplotlib complains about freetype
Both freetype and freetype-devel are installed.
~/.pip/pip.log provides the explanation of the problem. There is the line:
freetype: no [Requires freetype2 2.3 or later. Found 2.2.1.]
Obviously, the solution is either to upgrade freetype or downgrade matplotlib.
The second is easier (assuming I am OK with the older version).
pip install matplotlib==1.3.1 works fine.
On the matplotlib installation, this is what I did. Not sure if this is going to help you. Just followed the steps here:
http://pkgs.org/centos-6/centos-x86_64/python-matplotlib-0.99.1.2-1.el6.x86_64.rpm.html
I did not use pip, btw and have CentOS 6.4.
I had this happen to me in two different situations, see if yours is one of them:
freetype was installed, but not in the $PATH yet. Just exiting the shell and starting a new one fixed this.
I was building matplotlib from source, and trying to build from the master branch. After I switched to v1.3.x it correctly detected freetype.