Can't create conda enviroment having visual studio error - python-3.x

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?

Related

Installed C++ build tools via Visual Studio Installed, but pip install pycocotools still give me error

Installing pycotools via pip install gives the error
error log of failing to install pycotools
I have installed C++ build tools via Visual Studio Installed
image of installed C++ build tools
But, when I pip install pycocotools,
It still gives the error
error log of failing to install pycotools
Do not try for installing pycocotools(original) on Visual Studio.
if you want to do that, you must install clone of pycocotools from this: https://github.com/philferriere/cocoapi
Thx to MAHDI SOLTANI PAKDEL's solution,
I have found an alternative solution: installing pycocotools won't require C++ build tools.
conda install -c conda-forge pycocotools
conda install -c conda-forge/label/gcc7 pycocotools
conda install -c conda-forge/label/cf201901 pycocotools
conda install -c conda-forge/label/cf202003 pycocotools

How to install dlib in linux offline?

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 :)

pdftotext is not getting installed in windows

I am trying to extract data from an invoice. I found invoice2data will do that job. I have pip installed invoice2data.
from invoice2data import extract_data
This is getting imported.
result = extract_data('sample.pdf')
When I run the above line it is showing that
OSError: pdftotext not installed. Can be downloaded from https://poppler.freedesktop.org/
When I try pip installing pdftotext it was showing virtual c++ 14.0 is required.I installed it using build tools. Again it was showing the same error. So I downloaded the files from https://pypi.org/project/pdftotext/ and pasted the extracted files in my anaconda/Lib/sitepackages directory. Now when I try to pip install pdftotext it is showing Requirement already satisfied: pdftotext in c:\users\vicky\anaconda3\lib\site-packages (2.1.2) Now, when I try to extract data from the pdf it is again showing the same error that pdftotext is not installed. How can I overcome this error or is there any other package that will satisfy my requirement?
Thanks in advance.
Install poppler-utils before pdftotext
sudo apt-get install poppler-utils
some simple steps to do, which worked for me...
1. download and install Visual Studio with C++ Build Tools, as Microsoft Visual C++ is required.
https://visualstudio.microsoft.com/downloads/
2. Download the latest binaries of Popplers for Windows
https://blog.alivate.com.au/poppler-windows/index.html
3. Extract and copy the 'poppler' folder which is inside the folder 'include'
4. Past this 'poppler' folder inside the 'Anaconda3/include/' folder
5. Then run 'pip install pdftotext'
YOU ARE DONE!!!

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 I can solve pyaudio installation problem in (python3.7 64bit)

when I am install pyadio through cmd there was genrate error that is
***Collecting pyaudio
Complete output from command "c:\users\this pc\appdata\local\programs\python\python37\python.exe" -u -c "import setuptools, tokenize;file='C:\Users\THISPC~1\AppData\Local\Temp\
compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
copying src\pyaudio.py -> build\lib.win-amd64-3.7
running build_ext
building '_portaudio' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools***
But i am already install Microsoft visual c++ 14.0
When we try to install Pyaudio on Windows it gives us lots of dependencies errors.
The best solution i am able to figure out is use conda environment to resove this.
Once the conda environment is setup in Pycharm(IDE) i am using then we can simply install Pyaudio usign Pip command.
pip install PyAudio
Download and Install Anaconda3 using the link below:-
https://www.anaconda.com/products/individual
Hope this helps.

Resources