How to install dlib in linux offline? - linux

I have a linux server can not link the Internet and I wand to install dlib in my anaconda enviroment. But I do not know how to install cmake and boost for python? can any one help me? thx

You can't install Dlib directly without cmake and visual studio
First Download the CMake installer and install it from 'https://cmake.org/download/'
Add CMake executable path to the Enviroment Variables:
set PATH="%PATH%;C:\Program Files\CMake\bin"
Then "pip install CMake"
Install Visual Studio build tools from 'https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=15#'
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.
The at last "pip install dlib"
It definitely works., have a try :)

Related

How to install Visual C++ build tools (14.0+) in CentOS 8?

I want to install Visual C++ Build Tools in a machine that is running in CentOS 8.
I went through many answers, but everything is based on either Windows or Mac.
I also tried
pip install --upgrade setuptools
But this one too doesn't help me.
After searching many websites, finally, I got the answer from the comment section of this question.
Where-to-get-msbuild-fro-linux

Pocket sphinx and virtual assistant

I am trying to do a virtual assistant as my major project. So I want to install pocket sphinx package to run this offline. If anyone know this please answer to this.
I thing you are using pocketsphinx for speech to text conversion. If its so pocketsphinx package used to convert speech into text(offline as well) in Python.
Below comments is used to installing the packages.
pip install SpeechRecognition
conda install swig
pip install pocketsphinx
Once Installing pocketsphinx you may get the error like "Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ please install "Microsoft Visual C++ 14.0" then do "pip install pocketsphinx" Once installed the above packages you can start testing some ".wav" file for speech to text conversion.
import speech_recognition as sr
AUDIO_FILE='C:\\Users\\Downloads\\test.wav'
r=sr.Recognizer()
with sr.AudioFile(AUDIO_FILE) as source:
audio=r.record(source)
text=r.recognize_sphinx(audio)
with open("result.txt","w") as text_file:
text_file.write(format(text))

Can't create conda enviroment having visual studio error

I have the following problem:
Calling
conda env create environment.yml
where .yml file contains:
name: my_env
dependencies:
- pip:
- -r file:requirements.txt
And I got an error
Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio"
For almost every package I need to install.
VC++ Build tools are definetely installed and every single package from requirements.txt can be installed with either conda install or pip install without any problems whilst they can't be installed with create env as described above.
What is the problem?

ModuleNotFoundError: No module named 'misaka'

In python misaka module not able to install while installing pip install misaka showing download error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Vi
sual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
please suggest the above solution. i checked python version for system 64 same is there.
use following code in your cmd
pip install misaka
to install miska library
some example
from misaka import Markdown, HtmlRenderer
rndr = HtmlRenderer()
md = Markdown(rndr)
print(md('some text'))
Working solution!
Go to https://visualstudio.microsoft.com/downloads/ scroll down one page and download Visual Studio 2017 community.
Go through following link to download the required components for Microsoft Visual C++ 14.0, the link provides what components to be selected while downloading.
https://developercommunity.visualstudio.com/content/problem/409173/error-microsoft-visual-c-140-is-required.html
Once the download finishes, you will be asked to restart your system.
Having restarted your system, type
pip install django-misaka
Hope it works as it worked for me!
you should have install the module using pip
pip install django-misaka

How to resolve the spacy package installation error

I am using python3.5.2 on windows server. I have tried to install spacy package in my virtual environment on windows. While tring to install spacy with the command using pip, am getting the error Microsoft Visual C++ 14.0 is required. I have installed that too. But getting the same issue. Please help me solve this issue and install the spacy package
Most probably its asking for Visual Studio C++ Build tools now, at least that was my case. So I installed it and ran vcvarsall.bat from
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat
After which I could install SpaCy.

Resources