dlib installation on Windows 10 - python

I want to use dlib with python for image recognition. I have the python app running great with OpenCV on Windows 10, but when I want to install dlib from the cmd it gives me this following error :
error: Cannot find cmake, ensure it is installed and in the path. You
can install cmake using the instructions at https://cmake.org/install/
You can also specify its path with --cmake parameter.
What should I do?

Install Dlib from .whl
Dlib 19.7.0
pip install https://pypi.python.org/packages/da/06/bd3e241c4eb0a662914b3b4875fc52dd176a9db0d4a2c915ac2ad8800e9e/dlib-19.7.0-cp36-cp36m-win_amd64.whl#md5=b7330a5b2d46420343fbed5df69e6a3f
You can test it, downloading an example from the site, for example SVM_Binary_Classifier.py and running it on your machine.
Note: if this message occurs you have to build dlib from source:
dlib-19.7.0-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform
Install Dlib from source (If the solution above doesn't work)##
Windows Dlib > 19.7.0
Download the CMake installer and install it: https://cmake.org/download/
Add CMake executable path to the Enviroment Variables:
set PATH="%PATH%;C:\Program Files\CMake\bin"
note: The path of the executable could be different from C:\Program Files\CMake\bin, just set the PATH accordingly.
note: The path will be set temporarily, to make the change permanent you have to set it in the “Advanced system settings” → “Environment Variables” tab.
Restart The Cmd or PowerShell window for changes to take effect.
Download the Dlib source(.tar.gz) from the Python Package Index : https://pypi.org/project/dlib/#files extract it and enter into the folder.
Check the Python version: python -V. This is my output: Python 3.7.2 so I'm installing it for Python3.x and not for Python2.x
note: You can install it for both Python 2 and Python 3, if you have set different variables for different binaries i.e: python2 -V, python3 -V
NOTE: Make sure to open the PowerShell as admin, and you're inside the dlib directory before proceeding to step 6
Run the installation: python setup.py install
Linux Dlib 19.17.0
sudo apt-get install cmake
wget https://files.pythonhosted.org/packages/05/57/e8a8caa3c89a27f80bc78da39c423e2553f482a3705adc619176a3a24b36/dlib-19.17.0.tar.gz
tar -xvzf dlib-19.17.0.tar.gz
cd dlib-19.17.0/
sudo python3 setup.py install
note: To install Dlib for Python 2.x use python instead of python3 you can check your python version via python -V

Follow these steps:
pip install cmake
Install Visual Studio build tools from here.
In Visual Studio 2017 go to the Individual Components tab, Visual C++ Tools for
Cmake, and check the checkbox under the "Compilers, build tools and runtimes" section.
pip install dlib

Effective till now(2020).
pip install cmake
conda install -c conda-forge dlib

If you are using Anaconda Prompt (recommended),
conda install -c conda-forge dlib
Or you can use the approach mentioned below:
After spending a lot of time, this comment gave me the right result.
https://github.com/ageitgey/face_recognition/issues/802#issuecomment-544232494
Download Python 3.6.8 and install, make sure you add it to PATH.
Install NumPy, scipy, matplotlib and pandas in your pc/laptop with this command in command prompt:-
pip install numpy
pip install scipy
pip install matplotlib
pip install pandas
Go to https://pypi.org/project/wheel/#files and right-click on filename wheel-0.33.6-py2.py3-none-any.whl (21.6 kB) and copy link address. Then go to your pc/laptop, open command prompt and write this command "python -m pip install" after this command space first then paste the link copied. After installing successful go to the next step.
Then go to this link, https://pypi.org/simple/dlib/ and right-click on filename "dlib-19.8.1-cp36-cp36m-win_amd64.whl" then copy link address. Then open command prompt and do the same as step 2 which is, write this command "python -m pip install" after this command space first then paste the link copied. then the dlib will be installed successfully.
After that, type python and enter, then type import dlib to check dlib is installed perfectly. you can proceed to install face recognition.py which suite for python 3.6.

As you can see many answers above, But i would like to post a quick solution which works for sure in Anaconda3. I haven't chosen Visual Studio as it consumes lot of memory.
Please follow the below steps.
Step 1:
Install windows cmake.msi and configure environment variable
Step 2:
Create a conda environment, and install cmake using the below command.
pip install cmake
Step 3:
conda install -c conda-forge dlib
Note you can find few other dlib packages, but the above one will works perfectly with this procedure.
dlib will be successfully installed.

You need to install Cmake.
dlib is an c++ libary with python bindings. It needs to be builded first. My guess is this will happen automatically once you have installed Cmake

So basically I have been searching the solution for two days.
I tried everything
Installing Cmake
Adding path
installing dlib from the links mentioned in the answers
Installing ## Heading ## numpy, scipy, matplotlib, pandas
etc etc etc
BUT THE ONLY SOLUTION THAT WORKED WAS
INSTALLING MICROSOFT VISUAL STUDIO C++
After installing MS VS C++ I ran command pip install dlib and it is working like a charm.
BEST OF LUCK
Link to download Visual Studio C++
https://visualstudio.microsoft.com/thank-you-for-downloading-visual-studio-for-cplusplus/?sku=Community&rel=16&rid=30005

You have to install cmake as the error tells you.
you can follow this instructions https://www.learnopencv.com/install-dlib-on-windows/
or directly install cmake from here https://cmake.org/download/
Once cmake is installed pip install dlib should work.
I had vstudio building tools installed whe I did my test.

Choose dlib .whl file according to your installed python version.
For example if installed python version is 3.6.7 , 64bit system or if python is 3.5.0 32 bit
then choose dlib-19.5.1-cp36-cp36m-win_amd64.whl and dlib-18.17.100-cp35-none-win32.whl respectively.
Bolded text says the python supporting version.
Download wheel file from here or copy the link address
pip install dlib-19.5.1-cp36-cp36m-win_amd64.whl
for above method .whl file shoud be in the working directory
or
Below link for python3.6 supporting dlib link, for python 3.5 u can replace with dlib 35.whl link
pip install https://files.pythonhosted.org/packages/24/ea/81e4fc5b978277899b1c1a63ff358f1f645f9369e59d9b5d9cc1d57c007c/dlib-19.5.1-cp36-cp36m-win_amd64.whl#sha256=7739535b76eb40cbcf49ba98d894894d06ee0b6e8f18a25fef2ab302fd5401c7

1.use python 3.6.9 version
2.first install cmake.
conda install -c anaconda cmake
use these command to install dlib
pip install https://pypi.python.org/packages/da/06/bd3e241c4eb0a662914b3b4875fc52dd176a9db0d4a2c915ac2ad8800e9e/dlib-19.7.0-cp36-cp36m-win_amd64.whl#md5=b7330a5b2d46420343fbed5df69e6a3f

Just a quick update on what has worked for me (two years later). Davis King has provided two ways to add the latest python dlib (19.17.0) to any python environment in Windows 10 for me. Note, I run several Linux configs in Oracle VirtualBox but Windows 10 is my native OS which has access to the Nvidia GPU so i need an install on Windows 10. (Cannot access the GPU - easily - through VirtualBox).
First - the easiest:
pip install dlib
and the website link: https://pypi.org/project/dlib/
And then it can be easily be build from sources. Download from https://pypi.org/simple/dlib/ and follow instructions on http://dlib.net/compile.html.
Also, just found another way to access with Visual Studio 2019 (or 2017). Use vcpkg - see link https://vcpkg.readthedocs.io/en/latest/
I built dlib 19.17 on Windows 10 with CMake and it worked fine but then I found vcpkg and now the dlib libraries are integral to the Visual Studio. I no longer need to add all the external links to C++ and the linker.The version in vcpkg is currently 19.16-1 and it is built with full CUDA support.
Hope this helps others..

You can use vcpkg to install dlib.
If you don't have vcpkg, you can get it here (Read Quick Start)
After you got vcpkg, run:
vcpkg install dlib:x64-windows

I have recently installed dlib on python 3.7.
First I have installed cmake from anaconda navigator (cmake version 3.14.0)
Next i installed visual studio 2019 and installed Desktop development with C++ .
Then I do pip install dlib and now its working

None of the answers worked for me. This is what worked
Assuming you have anaconda python 3.7 installed
1) Dowload and install cmake(make sure to check the option to add cmake to system path during installation to avoid manually doing later)
Download from this link cmake download
2) conda install -c conda-forge dlib

It is basically a two-step process:
install cmap
pip install cmap
install dlib
pip install https://pypi.python.org/packages/da/06/bd3e241c4eb0a662914b3b4875fc52dd176a9db0d4a2c915ac2ad8800e9e/dlib-19.7.0-cp36-cp36m-win_amd64.whl#md5=b7330a5b2d46420343fbed5df69e6a3f

If you're trying to install dlib on Windows 10 with Visual Studio 2019, then first perform:
pip install cmake
And set it in the environment variable. After that, make sure that you have the latest version of Visual Studio SDK installed. After that, perform:
pip install dlib
I hope this solves the problem

Update/Install Visual C++
Maybe try installing/updating Visual C++. Because this is necessary for CMake to run. You can install it from here, https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=15#
Installation with Wheel File
Run this:
pip install https://pypi.python.org/packages/da/06/bd3e241c4eb0a662914b3b4875fc52dd176a9db0d4a2c915ac2ad8800e9e/dlib-19.7.0-cp36-cp36m-win_amd64.whl#md5=b7330a5b2d46420343fbed5df69e6a3f
Installation from Internet
Install CMake from https://cmake.org/download/
Run this,
set PATH="%PATH%;C:\Program Files\CMake\bin
to add CMake to your path. You can also do this manually by Editing The Environment Variables.
3)Download the following,
https://pypi.org/project/dlib/#files.
In the specified folder in which you extracted the install files run the following,
python setup.py install.

Simple and 100% working trick
(Make sure you install cmake)
My Anaconda python ver : 3.6.8 (64 bit) | OS :Windows 10
python -m pip install https://files.pythonhosted.org/packages/0e/ce/f8a3cff33ac03a8219768f0694c5d703c8e037e6aba2e865f9bae22ed63c/dlib-19.8.1-cp36-cp36m-win_amd64.whl#sha256=794994fa2c54e7776659fddb148363a5556468a6d5d46be8dad311722d54bfcf

Install dlib in Windows
download dlib from https://github.com/davisking/dlib.git
download camke from https://cmake.org/download/
Extract cmake and configure it as Environment variable to the extracted path my it was C:\Users\admin\Downloads\cmake-3.8.1-win32-x86\cmake-3.8.1-win32-x86\bin
Now extract dlib zip file and go to dlib folder
Follow this commands
cd dlib/test
mkdir build
cd build
cmake ..
cmake --build . --config Release
Now go to Release folder which would be at dlib\test\build\Release and execute this command
dtest.exe --runall
This process takes time as cmake compiles all C++ files so stay clam.
Enjoy!!!

Related

ERROR: dlib-19.8.1-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform

while downloading the dlib module, the terminal output returns with an error:
CMake Error in CMakeLists.txt:
The CMAKE_CXX_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
Alright. I was installing dlib for quite a while. I know what NOT to do now.
The only thing you need is this.
Follow the steps. That is it. Turns out that dlib is not supported by the pythons latest version. So you have to install a python wheel which is easy to install by the command pip install wheel on your cmd . Then after downloading the files mentioned [Follow the steps mentioned in the git profile below, you'll be good.]
It gets kind of stressful to install all the things separately. The link below runs a setup to install the dlib package. It will ask your user permission to run and will be blocked by the windows defender, but press more and click on "Run anyways".
Don't forget to test your package installation !
https://github.com/shashankx86/dlib_compiled
Issues got fixed by trying below solutions
Try installation using wheel files
Even it gets failed due to platform unsupport, please try the below options
Try to installing the source files from https://pypi.org/project/dlib/#files and run pip setup.py install by placing your files into site packages folder.
If its shows any ssize_t variable issue in numpy, please declare a local variable ssize on the top of the file
check this link for installation on ubuntu or mac os platform https://www.pyimagesearch.com/2018/01/22/install-dlib-easy-complete-guide/
The another type installation method if you are using dlib for face_recognition models then follow this answer
(with python 3.6 to 3.7.0 working normally).
First create an environment , conda create -n env_name python=version
then activate, conda activate env_name
now install via conda forge channel, conda install -c conda-forge dlib=19.17

Unable to install pdftotext on Python 3.6, missing poppler

How can I install pdftotext properly?
I'm getting the error message below when installing pdftotext in Python 3.6. I also tried to install the package manually by downloading the zip file but still got the same error.
pdftotext/pdftotext.cpp(4): fatal error C1083: Cannot open include file: 'poppler/cpp/poppler-document.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
I found some help in the Readme.md file in the pdftotext package :
1) Install OS Dependencies :
on Debian, Ubuntu, and friends:
sudo apt-get update
sudo apt-get install build-essential libpoppler-cpp-dev pkg-config python-dev
on Fedora, Red Hat, and friends:
sudo yum install gcc-c++ pkgconfig poppler-cpp-devel python-devel redhat-rpm-config
2) Do the normal install :
pip install pdftotext
and it worked for me.
I've been trying to figure out how to install pdftotext on Win10 for a few days. Internet searches have given me nothing. So for those who need to know, here's installing pdftotext on Win10 with Anaconda. YMMV.
Install Anaconda Python. There are many articles on installing Anaconda, so I won't explore that here.
Try to run pip install pdftotext, you will get an error that the Microsoft Visual C++ is required.
Navigate in a browser to http://visualstudio.microsoft.com/downloads. Under the Tools for Visual Studio 2019 tab download the Build Tools for Visual Studio 2019. You’ll then install the tools by checking the C++ build tools option box and clicking Install.
You should now get the pip install to move past the VC++ error. Unfortunately you’ll now get the error “Cannot open include file: ‘poppler/cpp/poppler-document.h’. This is because you’re missing the poppler libraries.
Head back to the internets! You’ll need poppler for windows. At the time of this writing, your best option is http://blog.alivate.com.au/poppler-windows. Grab the latest binary, and uncompress it. If you look at the error, pip is looking for the header file at {Anaconda3 directory}\include\poppler\cpp\poppler-document.h. So look in the archive you just unzipped. In the include folder, you’ll see a poppler directory. If you go down into the cpp directory in there you’ll find the poppler-document.h file.
I copied the entire poppler directory into the Anaconda3\include folder, so do that.
If you try to run pip install again, you'll still get a ton of errors! But these are not any of the errors that you saw previously, instead this error is looking for a missing linked library, poppler-cpp.lib. A search through Conda installs on another machine found this file in the poppler package. So
conda install -c conda-forge poppler
Which will install our poppler-cpp.lib file. Then we can copy the file from its home at {Anaconda3 directory}\Library\lib\poppler-cpp.lib and paste it where pdftotext is expecting it at {Anaconda3 directory}\libs.
If we do a pip install pdftotext again, there it is! I’m sure someone will find a way to refine this a bit, but for now we have a working pdftotext Python library on Win10.
These directions can be found, with screenshots, at my blog https://coder.haus/2019/09/27/installing-pdftotext-through-pip-on-windows-10/
Below command solved the problem for me.
sudo apt-get install libpoppler-cpp-dev
https://blog.droidzone.in/2018/05/01/install-pdftotext-python-extension-error/
And for macOS:
brew install poppler
brew install pkg-config poppler python
For Ubuntu users
sudo apt-get install libpoppler58=0.41.0-0ubuntu1 libpoppler-dev libpoppler-cpp-dev
worked for me
Simple solution for windows:
Download the poppler zip file from http://blog.alivate.com.au/wp-content/uploads/2018/10/poppler-0.68.0_x86.7z
Download and install visual studio tools from https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=15
Set the folder \poppler-0.68.0\bin to path in the environmental variables.
Thats it. Restart your environment eg could be jupyter notebook, vscode etc. Enjoy
To install pdftotext on Windows 10, I tried to follow Jason Woods' answer.
I want to add to this answer, that it is necessary to have the "C++ Desktop applications development" package installed in Visual Studio.
Make sure to install the "C++ Build Tools" as well, as mentioned in Jason Woods' answer.
Follow the rest of his answer. Quick summary:
install Anaconda Python
in the Anaconda Prompt, type:
conda install -c conda-forge poppler
now install the pdftotext package: pip install pdftotext
It worked for me. Thank you.

How to get Python import working with dlib (using cmake and osx)

Sorry if this is basic but I'm trying to install dlib to use with python as mentioned in (http://blog.dlib.net/2014/04/dlib-187-released-make-your-own-object.html) "Make your own object detector in Python!".
I downloaded the install files, unzipped, and used cmake as in the install instructions (http://dlib.net/compile.html)
cd examples
mkdir build
cd build
cmake ..
cmake --build . --config Release
which seemed to work fine
However typing "import dlib" in Python just gives ImportError: No module named dlib.
Any idea how I tell Python how to find / use the thing?
Just a note for reference that the easiest way to install is now to use:
sudo python setup.py install
Instead of manual file editing, you can pass -DPYTHON_LIBRARY:FILEPATH=/path/to/your/libpython2.7.dylib to cmake.
What ./compile_dlib_python_module.bat does is
mkdir build
cd build
cmake ../../tools/python
So, just run the commands by one by one and instead of
cmake ../../tools/python
run
cmake ../../tools/python -DPYTHON_LIBRARY:FILEPATH=/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib
Dlib installation instructions for OSX (python3)
brew uninstall boost-python
brew uninstall boost
brew install boost-python --with-python3 --without-python
Installing default dlib
pip3 install dlib
Following Gives Some speedup
Installing dlib with AVX, SSE2, SSE4 instructions enabled (download the source code from dlib.net and execute from within the directory).
python setup.py install --yes USE_AVX_INSTRUCTIONS --yes USE_SSE2_INSTRUCTIONS --yes USE_SSE4_INSTRUCTIONS
On ubuntu I had to do the following:
sudo apt-get install libboost-python-dev cmake
cd to dlib-18.15/python_examples
Then:
./compile_dlib_python_module.bat
I then copied the dlib.so to dist-packages so it would be in my path.
sudo cp dlib.so /usr/local/lib/python2.7/dist-packages/
According to the documentation compile_dlib_python_module.bat will work on any os once you have both CMake and boost-python installed.
I finally got it to work! I'll be posting a detailed blog post about this later, but here's the gist for now. Basically, when I manually inspected the output of cmake, dlib was compiling and linking against the system version of Python not the Homebrew version of python.
If you're interested in the details, it appears that cmake was trying to compile and link against /usr/lib/libpython2.7.dylib. However, that is the system version of Python. It should be compiling a linking against /usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib which is the Homebrew version of Python.
I manually edited CMakeFiles/dlib_.dir/build.make and /CMakeFiles/dlib_.dir/link.txt to point to the Homebrew dylib file instead of the system one. I was able to compile dlib and then run it without a segfault. And furthermore, I was able to run the object detectors without a problem.
You are compiling the C++ example programs. The python examples are in the python_examples folder. Also, each example has instructions at the top that tell you how to use it.
If you use Conda, it's much easier.
conda install -c menpo dlib
https://anaconda.org/menpo/dlib
for Python 3 support use:
python setup.py install --yes DPYTHON3
If you already compiled dlib source code from github by cmake command.
Then you want to run python program to call dlib api.
You should compile dlib Python API as below,
sudo python setup.py install
Or
sudo python setup.py install --yes USE_AVX_INSTRUCTIONS
if you have a CPU that supports AVX instructions, since this makes some things run faster. Note that you need to have boost-python installed to compile the Python API.(Linked from dlib README.md)
It works for me.
I encounted the same error with you.
When I looked at the folder "C:\Anaconda3\Lib\site-packages", I found "dlib-19.8.0-py3.4-win-amd64.egg\", it means I have compiled dlib successfully, but there is no "dlib\" folder under the "C:\Anaconda3\Lib\site-packages", it is inside "dlib-19.8.0-py3.4-win-amd64.egg\" folder, so the solution is simple: just copy the "dlib\" folder to path "C:\Anaconda3\Lib\site-packages", the Python interpreter will find the module and import it successfully.
Hope it will help!

Installing NumPy and SciPy on 64-bit Windows (with Pip)

I found out that it's impossible to install NumPy/SciPy via installers on Windows 64-bit, that's only possible on 32-bit. Because I need more memory than a 32-bit installation gives me, I need the 64-bit version of everything.
I tried to install everything via Pip and most things worked. But when I came to SciPy, it complained about missing a Fortran compiler. So I installed Fortran via MinGW/MSYS. But you can't install SciPy right away after that, you need to reinstall NumPy. So I tried that, but now it doesn't work anymore via Pip nor via easy_install. Both give these errors:
There are a lot of errors about LNK2019 and LNK1120,.
I get a lot of errors in the range of C: C2065,C2054,C2085,C2143`, etc. They belong together I believe.
There is no Fortran linker found, but I have no idea how to install that, can't find anything on it.
And many more errors which are already out of the visible part of my cmd-windows...
The fatal error is about LNK1120:
build\lib.win-amd64-2.7\numpy\linalg\lapack_lite.pyd : fatal error LNK1120: 7 unresolved externals
error: Setup script exited with error: Command "C:\Users\me\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\BLAS /LIBPATH:C:\Python27\libs /LIBPATH:C:\Python27\PCbuild\amd64 /LIBPATH:build\temp.win-amd64-2.7 lapack.lib blas.lib /EXPORT:initlapack_lite build\temp.win-amd64-2.7\Release\numpy\linalg\lapack_litemodule.obj /OUT:build\lib.win-amd64-2.7\numpy\linalg\lapack_lite.pyd /IMPLIB:build\temp.win-amd64-2.7\Release\numpy\linalg\lapack_lite.lib /MANIFESTFILE:build\temp.win-amd64-2.7\Release\numpy\linalg\lapack_lite.pyd.manifest" failed with exit status 1120
What is the correct way to install the 64-bit versions NumPy and SciPy on a 64-bit Windows machine? Did I miss anything? Do I need to specify something somewhere? There is no information for Windows on these problems that I can find, only for Linux or Mac OS X, but they don't help me as I can't use their commands.
You can install scipy and numpy using their wheels.
First install wheel package if it's already not there...
pip install wheel
Just select the package you want from http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
Example: if you're running python3.5 32 bit on Windows choose scipy-0.18.1-cp35-cp35m-win_amd64.whl then it will automatically download.
Then go to the command line and change the directory to the downloads folder and install the above wheel using pip.
Example:
cd C:\Users\[user]\Downloads
pip install scipy-0.18.1-cp35-cp35m-win_amd64.whl
EDIT: The Numpy project now provides pre-compiled packages in the wheel format (package format enabling compiled code as binary in packages), so the installation is now as easy as with other packages.
Numpy (as also some other packages like Scipy, Pandas etc.) includes lot's of C-, Cython, and Fortran code that needs to be compiled properly, before you can use it. This is, btw, also the reason why these Python-packages provide such fast Linear Algebra.
To get precompiled packages for Windows, have a look at Gohlke's Unofficial Windows Binaries or use a distribution like Winpython (just works) or Anaconda (more complex) which provide an entire preconfigured environment with lots of packages from the scientific python stack.
Installing with pip
You can install the numpy and scipy wheels on Windows with pip in one step if you use the appropriate link from Gohlke's Unofficial Windows Binaries (mentioned by sebix) and run the Windows command prompt as Administrator. For example, in Python 3.5, you would simply use something like this:
# numpy-1.9.3+mkl for Python 3.5 on Win AMD64
pip3.5 install http://www.lfd.uci.edu/~gohlke/pythonlibs/xmshzit7/numpy-1.9.3+mkl-cp35-none-win_amd64.whl
# scipy-0.16.1 for Python 3.5 on Win AMD64
pip3.5 install http://www.lfd.uci.edu/~gohlke/pythonlibs/xmshzit7/scipy-0.16.1-cp35-none-win_amd64.whl
Best solution for this is to download and install VCforPython2.7 from https://www.microsoft.com/en-us/download/details.aspx?id=44266
Then try pip install numpy
Downloading the binaries for 64-bit from http://www.lfd.uci.edu/~gohlke/pythonlibs/, and installing it directly with pip in this order:
pip install numpy-1.12.0+mkl-cp36-cp36m-win64.whl
pip install scipy-0.18.1-cp36-cp36m-win64.whl
pip install matplotlib-2.0.0-cp36-cp36m-win64.whl
Note that you must place command prompt in the folder where you put the .whl files after downloading them, and you must run it as administrator,
worked for me on Windows 10 64-bit now python is up and running.
You can now pip install numpy on Windows!
"Note: this page has only historical relevance, you can now pip-install for windows"
Source: https://github.com/numpy/numpy/wiki/Whats-with-Windows-builds
Intel provides pre-compiled Python modules for free in their "Intel Distribution for Python". The modules are compiled against Intel's MKL (Math Kernel Library) and thus optimized for faster performance. The package includes NumPy, SciPy, scikit-learn, pandas, matplotlib, Numba, tbb, pyDAAL, Jupyter, and others. Find more information and the download link here
If you are on windows , you wouldn't need wheel anyway! You can directly install package by downloading the 32-bit package as win32 from this link [http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy] and then move that downloaded package to cmd's current directory and open cmd and write following codepip install numpy-1.13.1+mkl-cp36-cp36m-win32.whl then do it same for scipy
For 64-bit you need to install mingw-w64 as it is gcc and compiles numpy and scipy as precompiled status.
Currently it works fine with 32-bit.So I had opted for win32 package both for numpy+mkl and scipy in that link.
Hope This works! Give a try
You can download the needed packages from here and use pip install "Abc.whl" from the directory where you have downloaded the file.
Look into python wheels to solve your problem. The best part of python wheels is that they let you install C extensions with no compilers. I just installed numpy and scipy using pip in a clean python install and they both worked fine.
for python 3.6, the following worked for me
launch cmd.exe as administrator
pip install numpy-1.13.0+mkl-cp36-cp36m-win32
pip install scipy-0.19.1-cp36-cp36m-win32
Package version are very important.
I found some stable combination that works on my Windows10 64 bit machine:
pip install numpy-1.12.0+mkl-cp36-cp36m-win64.whl
pip install scipy-0.18.1-cp36-cp36m-win64.whl
pip install matplotlib-2.0.0-cp36-cp36m-win64.whl
Source.
Hey I had the same issue.
You can find all the packages in the link below:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#scikit-learn
And choose the package you need for your version of windows and python.
You have to download the file with whl extension. After that, you will copy the file into your python directory then run the following command:
py -3.6 -m pip install matplotlib-2.1.0-cp36-cp36m-win_amd64.whl
Here is an example when I wanted to install matplolib for my python 3.6 https://www.youtube.com/watch?v=MzV4N4XUvYc
and this is the video I followed.
Follow these steps:
Open CMD as administrator
Enter this command : cd..
cd..
cd Program Files\Python38\Scripts
Download the package you want and put it in Python38\Scripts folder.
pip install packagename.whl
Done
You can write your python version instead of "38"

How to Install M2crypto on Windows

After installing OpenSSL, downloading the pre-built Swig executable, and ensuring the openssl libraries are located in the default c:\pkg, pip install m2crypto results in:
...
C:\Program Files (x86)\gfortran\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Pyth
on27\include -IC:\Python27\PC -Ic:\pkg\include -Ic:\users\evbo\appdata\local\tem
p\pip_build_evbo\m2crypto\SWIG -c SWIG/_m2crypto_wrap.c -o build\temp.win32-2.7\
Release\swig\_m2crypto_wrap.o -DTHREADING
gcc: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
It seems the binary installer solution for M2crypto is no longer available and I don't see any mistakes I've made based on the M2crypto install doc.
How might I resolve this install issue? Is there a dependency on older versions of GCC?
I got lucky - there's an unofficial binary installer in lieu of chandlerproject.org/bin/view/Projects/MeTooCrypto being down:
https://github.com/saltstack/salt-windows-install/blob/master/deps/win32-py2.7/M2Crypto-0.21.1.win32-py2.7.msi
This answer is based on the GitHub comment at https://github.com/iOSForensics/pymobiledevice/issues/25#issuecomment-576119104, for a Python module that requires m2crypto.
Some builds for m2crypto for specific versions of Python are available from their CI: https://ci.appveyor.com/project/m2crypto/m2crypto/history. Try selecting a version, selecting a job that matches your Python version, then going to the "Artifacts" tab and downloading an installer. To install a .whl file, see step 11 of my build tutorial below.
M2Crypto-0.35.2.win-amd64-py3.8.zip is the m2crypto module that I have built on Windows 10 x64, Python 3.8.1. It should work on any x64-based version of Windows with any version of Python 3.8.X.
However, if you are unable to find a build that matches your Python version and system type and architecture, you may need to manually build m2crypto. I adapted the build steps from their CI build scripts: https://gitlab.com/m2crypto/m2crypto/blob/master/appveyor.yml. I built the module by doing the following:
Install the latest Build Tools for Visual Studio 2019. See https://visualstudio.microsoft.com/downloads/ under "All Downloads" -> "Tools for Visual Studio 2019". This direct link was active as of this writing: https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16
In the installer, select "C++ Build Tools", install, and reboot if necessary.
Install the latest full (not Light) OpenSSL for your architecture (Win64/Win32). Current version as of this writing is 1.1.1d. Make note of the directory to which you install OpenSSL. https://slproweb.com/products/Win32OpenSSL.html
In PowerShell, install the Chocolatey package manager. I used this command from their website: Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Install swig with Chocolatey (in PowerShell). choco install -r -y swig
Install the pywin32 dependency. Run pip install pywin32. If you have problems, try first running pip install wheel. To get pip to target a specific Python installation, try launching it using py -[version] -m pip install [module]. Note: you may need to use an elevated (administrator) PowerShell to install Python modules.
Get the latest m2crypto code. If you have git installed, run git clone https://gitlab.com/m2crypto/m2crypto. Otherwise, download and extract the code from GitLab: https://gitlab.com/m2crypto/m2crypto/-/archive/master/m2crypto-master.zip
Use cd to change into the directory m2crypto was cloned/extracted to.
Assuming python launches your desired Python interpreter version, run python setup.py build --openssl="C:\Program Files\OpenSSL-Win64" --bundledlls, replacing C:\Program Files\OpenSSL-Win64 with the directory to which you installed OpenSSL. (On some systems you can use the py launcher to specify a Python version to use, run py -h for more information.)
Generate the installable files. python.exe setup.py bdist_wheel bdist_wininst bdist_msi.
Install the module. cd into the dist directory and run pip install M2Crypto-0.35.2-cp38-cp38-win_amd64.whl, replacing the filename with the generated .whl file. If you have problems, try first running pip install wheel. To get pip to target a specific Python installation, try launching it using py -[version] -m pip install [module]. Alternatively, you can run the generated .exe or .msi installer. Note: you may need to use an elevated (administrator) PowerShell to install Python modules.
The https://gitlab.com/m2crypto/m2crypto project provides Windows builds of M2Crypto.
You can find wheels for current Python versions from their AppVeyor builds at https://ci.appveyor.com/project/m2crypto/m2crypto.
For example, to install M2Crypto 0.37.1 from https://ci.appveyor.com/project/m2crypto/m2crypto →
https://ci.appveyor.com/project/m2crypto/m2crypto/builds/37187357/job/5c56adinoe9l8kng/artifacts with pip for 64-bit Python 3.8, run:
pip install \
https://ci.appveyor.com/api/buildjobs/5c56adinoe9l8kng/artifacts/dist/M2Crypto-0.37.1-cp38-cp38-win_amd64.whl
NB! The artifacts may expire in AppVeyor, see this bug for updates.
It's late 2019 and installing M2Crypto is still a pain! After a ton of Googling, finally got it down to the steps below:
pip install wheel
pip install M2CryptoWin32
Using a fresh Python 2.7.17 32bit install on Windows 10. You might need install http://aka.ms/vcpython27 first.
I'd imagine one should use M2CryptoWin64 instead if you've installed 64-bit Python.
in windows, (python versions 3.7 | 3.8 | 3.9 | 3.10) you can download whl file from here and install it with this command:
python install M2Crypto-0.38.0-cp310-cp310-win_amd64.whl
replace current whl file name.
1~11: https://stackoverflow.com/a/59817750
12: install M2Crypto.whl and adb in one command
pip install M2Crypto-0.38.0-cp310-cp310-win_amd64.whl adb

Categories