Unable to install tesserocr on Mac - python

I'm trying to install tesserocr with the command:
pip install tesserocr
but I'm getting this error:
tesserocr.cpp:298:10: fatal error: 'utility' file not found
#include <utility>
^~~~~~~~~
1 warning and 1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
I have installed tesseract using: brew install tesseract
I'm using Mojave 10.14.3.

Try this one: CC=clang XCC=clang++ CPPFLAGS="-stdlib=libc++ -DUSE_STD_NAMESPACE -mmacosx-version-min=10.8" pip install tesserocr. It works fine for me.
And this original answer is from https://github.com/sirfz/tesserocr/issues/177.
Good Luck!

Related

Issues installing python package on windows

I'm trying to install python-rocksdb on a windows 10 machine and I'm coming across some issues with the install.
I have successfully installed rocksdb first using the vcpkg method.
When running pip install python-rocksdb I get the following error:
cl : Command line error D8021 : invalid numeric argument '/Wextra'
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
Looking around suggested attempting to install with GCC or G++, so I downloaded cygwin and then attempted to install the python package using
pip install --global-option build_ext --global-option --compiler=cygwin python-rocksdb which yielded the following error:
gcc: error: unrecognized command-line option ‘-mcygwin’
error: command 'C:\\cygwin64\\bin\\gcc.exe' failed with exit code 1
This post seems to suggest that you need to use g++ specifically, but it looks like the cygwin command is defaulting to gcc.
Just note that I'm not using the virtual env with python.
Any assistance is greatly appreciated.

Issue installing module sendkeys on mac

I am newbie python and selenium user.
I have tried to install sendkeys via pycharm ce and terminal.
In both cases got an error.
I suppose this would be the relevant piece
_sendkeys.c:14:10: fatal error: 'windows.h' file not found
#include "windows.h"
^~~~~~~~~~~
1 error generated.
error: command 'gcc' failed with exit status 1
Tried with and without sudo. pip, pip3 and pip3.8 to install and no difference.

pip install CrossMap failing on OSX: cannot find os/rand.c?

Just trying to run a
pip install CrossMap
on OSX 10.11.6 with a brew installed python (version 2.7.12) and pip (version 9.0.1) and running into this error:
htslib/hts_os.c:30:10: fatal error: 'os/rand.c' file not found
#include "os/rand.c"
^
1 error generated.
error: command 'clang' failed with exit status 1
I have looked everywhere for information on this error and it has come up empty. Where does this dependency come from and how do I install it?
Thanks!
CrossMap depends on pysam which is a wrapper for sam tools. You need to install htslib before compiling pysam.

Why is pip install pyopenssl==0.13 failing?

I'm trying to install PyOpenSSL 0.13 on my Macbook Pro (OSX version 10.11, El-Capitan). But it keeps failing. These are the steps I took
Download and install Command Line Tools (OSX 10.11) for Xcode 7.3.1 from here
$ virtualenv my-new-virtualenv
$ source my-new-virtualenv/bin/activate
$ pip install pyopenssl==0.13
When I do step #4, I get the following error:
OpenSSL/crypto/x509.h:17:10: fatal error: 'openssl/ssl.h' file not found
#include <openssl/ssl.h>
^
1 error generated.
error: command 'cc' failed with exit status 1
----------------------------------------
Failed building wheel for pyopenssl
Here is the entire trace showing that error.
Why am I getting this error and how can I fix it??
It appears you are missing the OpenSSL development headers, as mentioned by #Klaus D. This most likely happened because due to upgrading to El Capitan, these development headers were broken. It can usually be fixed by reinstalling your command line tools.
If you have Homebrew, run this code:
brew install openssl
Also, just out of curiosity, is there a particular reason why you want to use version 0.13? When I did $ pip install pyopenssl==0.14 I got no errors. See the bit on pyOpenSSL's documentation:

Install locust in Anaconda

I´m was trying to install locustio following this steps (http://docs.locust.io/en/latest/installation.html), in my terminal:
pip install locustio
I get this:
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'gcc' failed with exit status 1
I also have tried with easy_install:
sudo easy_install locustio
I get the same error. After that, yesterday I was looking for information about this, and some people says that you may to need install gcc.
brew install gcc
I get this message:
Warning: gcc-5.3.0 already installed
After a couple of hours looking for information, I read about Anaconda, I install Anaconda and I create my new environment... and in my new environment I get this again:
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'gcc' failed with exit status 1
I´m getting crazy. I would like to work in environments but I need some of help to do this because I lost a lot time trying to resolve this problem to use locustio.
I´m using Mac Yosemite 10.10.3
My Anaconda version is 3.19.0
My Python version is 2.7.11
My gcc is gcc-5.3.0
Someone can help me?
I just wanna launch locustio in my pc =(

Categories

Resources