How to install tensorflow on a offline computer - python

I am trying to install tensorflow on a machine with no internet access: the machine has Windows 7 and Python 3.6 Anaconda.
I tried different approaches but non of them worked.
This what i did so far:
install anaconda with python 3.6
pip install tensorflow tensorflow-1.3.0-cp36-cp36m-win_and64.whl
But when I try to import tensorflow i get the following error:
ModuleNotFoundError: No module name google
I have read that I should install protobuf-3.6.tar.gz but I get the error :register_loader_type...
So I installed setuptools-3.6-py2.py3-none-any.whl
and I still get the same error
So my question is: is there any way to install tensorflow on a offline computer or there is something that I did wrong?
NOTE: I am admin on this offline machine

python3 -m pip download tensorflow on a machine with internet with the same OS. You will download all the needed packages to the current directory. Move the files onto a USB, mount the USB on the device without internet, and then do python3 -m pip install --no-index --find-links . tensorflow in the directory with the copied .whl files.

create anaconda conda virtul environment in some internet available system and install necessary package for your project and copy virtual environment to you system. put inside anaconda env, it works

Requirements :- Bazel Installation, python >=2.7 and numpy.
You can use link. Installtion steps are given. I am explaining in more briefly:-
clone repo:-
git clone https://github.com/amutu/tensorflow-offline.git
Download tensorflow and tensorflow third party.(Note:-you have to download compatible version of tensorflow with tensorflow third party.)
unzip them. In terminal run:-
tf=/path/to/tensorflow/directory and tp=/path/to/tensorflow/third/party/directory.(Note:- you can check path typing $tf and $tp on terminal.)
Example:- tp=/home/ai/Documents/vineet/test/tensorflow_third_party-1.2.1
tf=/home/ai/Documents/vineet/test/tensorflow-1.2.1
Run:-
cd tensorflow-offline
In tensorlfow offline run:-
./fix_offline_build.sh $tf $tp.(Note: you may also need to download tensorflow-port donwload it from here in tensorflow-port directory)
Configure tensorflow using:- cd $tf && ./configure
Build it using :- bazel --config=opt //tensorflow/tools/pip_package:build_pip_package --verbose_failures and
bazel-bin/tensorflow/tools/pip_package/build_pip_package

Related

No matching distribution found for numpy (from torch==1.10)

Working on Ubuntu 18.04 in a VM.
I have python3 installed at /usr/bin/python3.6 according to whereis python3.
When I run pip3 freeze, I see numpy installed, with version 1.15.4, and when I enter into python3 console, I can import numpy as np perfectly fine with no errors.
What I am trying to do now is to install PyTorch, specifically torch==1.1.0, without GPU / CUDA.
I got the following installation instructions from https://pytorch.org/get-started/locally/:
pip3 install https://download.pytorch.org/whl/cpu/torch-1.1.0-cp36-cp36m-linux_x86_64.whl
pip3 install https://download.pytorch.org/whl/cpu/torchvision-0.3.0-cp36-cp36m-linux_x86_64.whl
I downloaded these wheel files, and tried to run them from local directory as such:
/usr/bin/python3.6 -m pip install ~/Desktop/torch-1.1.0-cp36-cp36m-linux_x86_64.whl
and got the following error:
No matching distribution found for numpy (from torch==1.1.0)
I don't understand why this is the case, cause my numpy library is clearly already installed and working (READ ABOVE: I am able to import numpy in python3 console). Also, I had no issues installing PyTorch with GPU on my Windows machine, with torch 1.1.0 and numpy 1.15.4.
Alternatively, I tried to build PyTorch from source by moving into the PyTorch source directory and executing /usr/bin/python3 setup.py install, but it didn't work since I am not using a GPU, and CUDA is not installed. I am not able to find instructions on how I can build PyTorch from source without GPU in a Linux environment?
Can anyone kindly advise? Thank you!
Some additional information
(1) Tried to install PyTorch with the --no-dependencies flag as suggested by #Jan, and it installed, but I am not sure if Torch will really work perfectly.
(2) which pip3 points to /usr/bin/pip3
(3) pip3 show numpy tells me that the location is at /home/name/.local/lib/python3.6/site-packages
If you are sure that all dependencies are manually installed, you could try --no-dependencies flag for pip3. Otherwise, I would point you to Anaconda as python environment provider, it is pretty convenient.
Since it would seem that pip works correctly, you could try creating a virtual environment using venv and install things from there.
I tested it on my machine (Ubuntu 18.04) and I installed torch successfully without CUDA by launching the same commands that you used, but in the virtualenv.
Just make sure that once you activate the environment, which python and which pip point to those in the env (i.e NOT /usr/bin/, but most likely in /home/<user>/<venv_name>/bin/python).
Edit:
Here are the steps I followed:
1) Install virtualenv with:
python3 -m pip install --user virtualenv
2) create a virtualenv named nogpu-venv (or whatever) with:
python3 -m venv nogpu-venv
This will create a folder where you launched the command named nogpu-venv.
3) Then activate the venv with source nogpu-venv/bin/activate.
You should see (nogpu-venv) to the left of your name in the terminal. Also, the commands which python and which pip should point to the respective files in the nogpu-venv.
4) Install torch with:
pip3 install https://download.pytorch.org/whl/cpu/torch-1.1.0-cp36-cp36m-linux_x86_64.whl
pip3 install https://download.pytorch.org/whl/cpu/torchvision-0.3.0-cp36-cp36m-linux_x86_64.whl
Hope it helps!

How to install mapnik python3 wrapper in conda?

I have installed mapnik 3.0.12 with conda install -c mrterry mapnik, but why I can`t import it in my code?
import mapnik
ModuleNotFoundError: No module named 'mapnik'
I looked in anaconda3/pkgs/mapnik-3.0.12-0/lib and there is no python3.7 folder there, only .so and .a files.
I have installed mapnik with sudo apt install python3-mapnik in ubuntu 18.04 and it imports well with /usr/bin/python3 interpreter. And in directory /usr/lib/python3/dist-packages/mapnik there is some .py files.
I'm not familiar with the tool, but it looks like Mapnik is a C++ library that has separate Python bindings. You need to install both mapnik and python-mapnik. Only Python 2 is supported, so you need to create a new env for this.
Conda (only if you trust the channel)
A search of Anaconda Cloud shows only linux-64 platform is available and only from user channels. I'm following your lead on using the mrterry channel, but generally I will only use a channel if I trust the user/org.
conda create -n myenv -c mrterry python=2.7 mapnik python-mapnik
Recommended Approach
Since I don't recognize any of the channels in the search, personally I would just follow the official install instructions. First, I would set up a Conda env with Python 2.7 and the dependencies that Mapnik lists. Then activate that env, and proceed with following the instructions (./configure, make, etc.).

installing xgboost on Python - channel not found [duplicate]

I am a new Python user. I downloaded the latest Anaconda 3 2.4.1 (Python 3.5) from the below link:
https://www.continuum.io/downloads
My PC Configurations are: Windows 10, 64 bit, 4GB RAM
I have spent hours trying to find the right way to download the package after the 'pip install xgboost' failed in the Anaconda command prompt but couldn't find any specific instructions for Anaconda.
Can anyone help on how to install xgboost from Anaconda?
The easiest way (Worked for me) is to do the following:
anaconda search -t conda xgboost
You will get a list of install-able features like this:
for example if you want to install the first one on the list mndrake/xgboost (FOR WINDOWS-64bits):
conda install -c mndrake xgboost
If you're in a Unix system you can choose any other package with "linux-64" on the right.
Update on 22/10/2020:
Without searching in conda list of channels, you can install it using (source: https://anaconda.org/anaconda/py-xgboost) :
conda install -c anaconda py-xgboost
Anaconda's website addresses this problem here: https://anaconda.org/anaconda/py-xgboost.
conda install -c anaconda py-xgboost
This fixed the problem for me with no problems.
Download package from this website.
I downloaded xgboost-0.6-cp36-cp36m-win_amd64.whl for anaconda 3 (python 3.6)
Put the package in directory C:\
Open anaconda 3 prompt
Type cd C:\
Type pip install C:\xgboost-0.6-cp36-cp36m-win_amd64.whl
Type conda update scikit-learn
After trying some things the only thing that worked for me is:
conda install -c anaconda py-xgboost
I was able to install xgboost for Python in Windows yesterday by following this link. But when I tried to import using Anaconda, it failed. I recognized this is due to the fact that Anaconda has a different Python distribution. I then searched again and found this great article which made it!
The trick is after installing successfully for regular Python, to have it work for Anaconda, you just need to pull up the Anaconda prompt and cd into this folder "code\xgboost\python-package", then run:
python setup.py install
And voila! The article says you need to add the path, but for me it worked directly. Good luck!
Also copied below the original contents in case the link is not available...
Once the last command completes the build is done. We can now install
the Python module. What follows depends on the Python distribution
you are using. For Anaconda, I will simply use the Anaconda prompt,
and type the following in it (after the prompt, in my case [Anaconda3]
C:\Users\IBM_ADMIN>):
[Anaconda3] C:\Users\IBM_ADMIN>cd code\xgboost\python-package
The point is to move to the python-package directory of XGBoost. Then type:
[Anaconda3] C:\Users\IBM_ADMIN\code\xgboost\python-package>python setup.py install
We are almost done. Let's launch a notebook to test XGBoost.
Importing it directly causes an error. In order to avoid it we must
add the path to the g++ runtime libraries to the os environment path
variable with:
import os
mingw_path = 'C:\\Program Files\\mingw-w64\\x86_64-5.3.0-posix-seh-rt_v4-rev0\\mingw64\\bin'
os.environ['PATH'] = mingw_path + ';' + os.environ['PATH']
We can then import xgboost and run a small example.
import xgboost as xgb
import numpy as np
data = np.random.rand(5,10) # 5 entities, each contains 10 features
label = np.random.randint(2, size=5) # binary target
dtrain = xgb.DMatrix( data, label=label)
dtest = dtrain
param = {'bst:max_depth':2, 'bst:eta':1, 'silent':1, 'objective':'binary:logistic' }
param['nthread'] = 4
param['eval_metric'] = 'auc'
evallist = [(dtest,'eval'), (dtrain,'train')]
num_round = 10
bst = xgb.train( param, dtrain, num_round, evallist )
bst.dump_model('dump.raw.txt')
We are all set!
I'm able to install using the following commands (in Windows 10) :
conda install -c mikesilva xgboost
conda install -c conda-forge xgboost
GUYS ITS NOT THAT EASY:-
PLEASE FOLLOW BELOW STEP TO GET TO MARK
So here's what I did to finish a 64-bit build on Windows:
Download and install MinGW-64: sourceforge.net /projects/mingw-w64/
On the first screen of the install prompt make sure you set the Architecture to x86_64 and the Threads to win32
I installed to C:\mingw64 (to avoid spaces in the file path) so I added this to my PATH environment variable: C:\ mingw64 \ mingw64 \ bin(Please remove spaces)
I also noticed that the make utility that is included in bin\mingw64 is called mingw32-make so to simplify things I just renamed this to make
Open a Windows command prompt and type gcc. You should see something like "fatal error: no input file"
Next type make. You should see something like "No targets specified and no makefile found"
Type git. If you don't have git, install it and add it to your PATH.
These should be all the tools you need to build the xgboost project. To get the source code run these lines:
cd c:\
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
git submodule init
git submodule update
cp make/mingw64.mk config.mk
make -j4
Note that I ran this part from a Cygwin shell. If you are using the Windows command prompt you should be able to change cp to copy and arrive at the same result. However, if the build fails on you for any reason I would recommend trying again using cygwin.
If the build finishes successfully, you should have a file called xgboost.exe located in the project root. To install the Python package, do the following:
cd python-package
python setup.py install
Now you should be good to go. Open up Python, and you can import the package with:
import xgboost as xgb
To test the installation, I went ahead and ran the basic_walkthrough.py file that was included in the demo/guide-python folder of the project and didn't get any errors.
if you found an issue when you try to import xgboost (my case it is Windows 10 and anaconda spyder) do the following:
Click on the windows icon (start button!)
Select and expand the anaconda folder
Run the Anaconda Prompt (as Administrator)
Type the following command as it is mentioned in https://anaconda.org/anaconda/py-xgboost
conda install -c anaconda py-xgboost
That's all...Good luck.
You can download the xgboost package to your local computer, and you better place the xgboost source file under D:\ or C:\ (ps: download address: http://www.lfd.uci.edu/~gohlke/pythonlibs/#xgboost, and select "xgboost-0.6-cp35-cp35m-win_amd64.whl",but it is up to your operation system), and you open the Anaconda prompt, type in pip install D:\xgboost-0.6-cp35-cp35m-win_amd64.whl, then you can successful install xgboost into your anaconda
Try running this on Anaconda prompt
pip install xgboost
This worked for me on Spyder with Python 3.5
I figured out easy way to install XgBoost by mix of what is mentioned here.
Step 1:
Install gitbash from here and start gitbash.
Step 2: git clone --recursive https://github.com/dmlc/xgboost
Step 3: git submodule init
git submodule update
step 4: alias make='mingw32-make'
step 5: cp make/mingw64.mk config.mk; make -j4
step 6: Goto Anaconda prompt and if you have a conda environment then activate that environment like my was py35 so I activate it by typing activate py35
cd python-package
python setup.py install
step 7: setup the Path in system environment variable to the path where you installed xgboost/python-package.
Use this in your conda prompt:
python -m pip install xgboost
The following worked for me:
conda install libxgboost
The package directory states that xgboost is unstable for windows and is disabled:
pip installation on windows is currently disabled for further invesigation, please install from github.
https://pypi.python.org/pypi/xgboost/
Anaconda3 version 4.4.0check image
Go to Anaconda -> Environments -> from the dropdown select not installed -> If you can see xgboost pr Py-xgboost select and click apply.
There are a lot of dependencies of anaconda that have changed over the past years and won't work if you used them now. Some of the answers need serious updation.
I found this command did the job for me :
conda install -c conda-forge xgboost
You may also want to look at the official documentation of anaconda for xgboost:
https://anaconda.org/conda-forge/xgboost
I have used this command and it worked for me.
import sys
!{sys.executable} -m pip install xgboost
Open anaconda prompt and run
pip install xgboost
You can install it using pip:
pip3 install --default-timeout=100 xgboost
This simple helped me you don't have to include anything at the end because if you include something, some of your packages will be upgraded but some will be downgraded.
You can get this from this url: https://anaconda.org/anaconda/py-xgboost
conda install -c anaconda py-xgboost
Look here https://github.com/Rafi993/xgboost/ for building xgboost on your machine. There are many different varieties of the solution above, but it seems that the version in the link above is the good one. At least that worked for me: I've tested it on Windows 7 and Windows Server 2008.
Then run the following commands in cmd in order to install python bindings:
cd python-package
python setup.py install
You might also need a proper mingw (google for tdm-gcc)
and the latest setuptools from anaconda.
I hope it will help

New Pycharm project with Anaconda needs to install pip packages everytime

I'm currently using Windows 10, and installed Pycharm and Anaconda on it in order to run Tensorflow. Everything is working well, I can select conda interpreter and then use the following command to install and run tensorflow.
pip.main(['install', 'tensorflow'])
My only problem is, everytime I create a new project in pycharm, I need to do this installation command again. Is there a more permanent method to do the installation in my case?
Thanks.
EDIT:I installed the package inside Pycharm as shown in this video
Install Video
First you need to build a TensorFlow virtual environment in Anaconda Navigator in the anaconda3 directory.As shown in the figure:anaconda navigator,environment about tensorflow.You can create a Tensorflow environment on the command line and install pycharm as a pip in this environment. This will allow you to use Tensorflow in pycharm.The code is as follows:
conda create -n tensorflow python=3.5
activate tensorflow
pip install --ignore-installed --upgrade tensorflow-gpu
This is a Chinese version of the installation instructions for TensorFlow + pycharm.installation instructions

dlib installation on Windows 10

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!!!

Categories