timClicks / slate

The simplest way to extract text from PDFs in Python
http://timmcnamara.co.nz/
GNU General Public License v3.0
428 stars 139 forks source link

cannot import 'slate' on Ubuntu Utopic & python 3.4.2 #18

Closed thomir closed 9 years ago

thomir commented 9 years ago

As it says on the tin - slate seems unimportable on Ubuntu Utopic, python 3.4.2 and what's currently released on pypi.

See full command output below:

thomi@peek$ virtualenv -p python3 ve3
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in ve3/bin/python3
Also creating executable in ve3/bin/python
Installing setuptools, pip...done.

thomi@peek$ . ve3/bin/activate

thomi@peek$ pip install slate
Downloading/unpacking slate
  Downloading slate-0.3.zip
  Running setup.py (path:/home/thomi/tmp/ve3/build/slate/setup.py) egg_info for package slate

Downloading/unpacking distribute (from slate)
  Downloading distribute-0.7.3.zip (145kB): 145kB downloaded
  Running setup.py (path:/home/thomi/tmp/ve3/build/distribute/setup.py) egg_info for package distribute

Requirement already satisfied (use --upgrade to upgrade): setuptools>=0.7 in ./ve3/lib/python3.4/site-packages (from distribute->slate)
Installing collected packages: slate, distribute
  Running setup.py install for slate

  Running setup.py install for distribute

Successfully installed slate distribute
Cleaning up...

thomi@peek$ python
Python 3.4.2 (default, Oct  8 2014, 13:08:17) 
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import slate
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/thomi/tmp/ve3/lib/python3.4/site-packages/slate/__init__.py", line 48, in <module>
    from slate import PDF
ImportError: cannot import name 'PDF'
BrianZbr commented 9 years ago

I'm having a similar problem on Ubuntu Trusty :(

kisna72 commented 9 years ago

Same problem on MAC OSx with python 3.4

erickpeirson commented 9 years ago

+1

timClicks commented 9 years ago

This should be fixed thanks to @erickpeirson :) Please feel free to comment again if this is still and issue.

molotovtommy commented 8 years ago

I encountered the same issue using python 3.5 on windows 8, the error reads unable to import PDF.

erickpeirson commented 8 years ago

@molotovtommy what version of slate?

molotovtommy commented 8 years ago

The slate version I am using is 0.3. I saw that there is a 0.4 version listed on their pypi page, but using pip install slate --update results in a message that the most current version is already satisfied? I installed pdfminer3k instead of pdfminer since that is the ported version for python 3 if I understand correctly.

Thomas A. Ulrich On Sun, Dec 27, 2015 at 4:43 PM, Erick < notifications@github.com [notifications@github.com] > wrote: @molotovtommy [https://github.com/molotovtommy] what version of slate?

— Reply to this email directly or view it on GitHub [https://github.com/timClicks/slate/issues/18#issuecomment-167447989] .[https://github.com/notifications/beacon/AL77NXc4_ZrgVsEFyk4upVhT949-j5Rtks5pUG8sgaJpZM4EeGT4.gif]

RafaelGPL commented 8 years ago

This is still an issue with python 3.5.

pdfminer3k isn't compatible with this.

https://github.com/hsoft/pdfminer3k/tree/master/pdfminer

The "pdfminer" that is required does not work because it is currently incompatible with python 3.5.

It says so on their readme:

https://github.com/euske/pdfminer

"Install Python 2.6 or newer. (Python 3 is not supported.)"

sherpanee commented 8 years ago

Yep, doesn't work for me either. OSX 10.11, Python 3.5. "ImportError: cannot import name 'PDF'"

berkeleydave commented 7 years ago

OSX 10.12, Python 3.5

from slate import PDF "ImportError: cannot import name 'PDF'"