1

I'm trying to install the textract module on Mac.

I used these commands to try and install it.

sudo python3 -m pip install textract   
python3 -m pip install textract
pip3 install textract
sudo pip3 install textract

I use pip3 since I have multiple versions of python installed on my device.

Every time, I get the following error:

Command "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3
-u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-ejk7ayox/pocketsphinx/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install
--record /private/tmp/pip-record-o8jq5l_l/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-install-ejk7ayox/pocketsphinx/

Following the advice here, I tried:

python3 -m pip install --upgrade pip 
python3 -m pip3 install --upgrade pip
sudo pip3 install -U setuptools
pip3 install --upgrade pip3

Pip and setup tools are both up to date and I still get the error.

Sebastian
  • 957
  • 3
  • 15
  • 27
  • Try to create a virtualenv, activate it and `pip install textract`. – gmagno Feb 10 '19 at 23:00
  • I tried that: `Command "/Users/One/python-virtual-environments/env/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-6okrc438/pocketsphinx/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/tmp/pip-record-l3zuyz25/install-record.txt --single-version-externally-managed --compile --install-headers /Users/One/python-virtual-environments/env/include/site/python3.7/pocketsphinx" failed with error code 1 in /private/tmp/pip-install-6okrc438/pocketsphinx/` – Sebastian Feb 10 '19 at 23:04
  • On my Ubuntu I can't reproduce the issue :-/ – gmagno Feb 10 '19 at 23:09

1 Answers1

1

Following the instructions in textract - installation:

brew cask install xquartz
brew install poppler antiword unrtf tesseract swig
pip install textract

I am able to install textract on my Mac.

keineahnung2345
  • 2,635
  • 4
  • 13
  • 28