PyTeaser icon indicating copy to clipboard operation
PyTeaser copied to clipboard

Error when running pip install pyteaser

Open jafetmorales opened this issue 7 years ago • 9 comments

This is the output when running pip install pyteaser

Collecting pyteaser
  Downloading https://files.pythonhosted.org/packages/d4/7a/310592c6e7998440e56a8650446ecf3ded076431415c60f0f3b946b54462/pyteaser-2.0.tar.gz (40kB)
Requirement already satisfied: Pillow in c:\users\jmorales\appdata\roaming\python\python35\site-packages (from pyteaser) (5.2.0)
Requirement already satisfied: lxml in c:\users\jmorales\appdata\roaming\python\python35\site-packages (from pyteaser) (4.2.3)
Requirement already satisfied: cssselect in c:\users\jmorales\appdata\local\programs\python\python35\lib\site-packages (from pyteaser) (1.0.3)
Requirement already satisfied: jieba in c:\users\jmorales\appdata\roaming\python\python35\site-packages (from pyteaser) (0.39)
Collecting beautifulsoup (from pyteaser)
  Downloading https://files.pythonhosted.org/packages/1e/ee/295988deca1a5a7accd783d0dfe14524867e31abb05b6c0eeceee49c759d/BeautifulSoup-3.2.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\jmorales\AppData\Local\Temp\pip-install-69mmyqv0\beautifulsoup\setup.py", line 22
        print "Unit tests have failed!"
                                      ^
    SyntaxError: Missing parentheses in call to 'print'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\jmorales\AppData\Local\Temp\pip-install-69mmyqv0\beautifulsoup\

This is my setup:

Python version: 3.5 OS: Windows 10 Home System Type: 64-bit Operating System, x64-based processor Processor: AMD A10-8700P Radeon R6

jafetmorales avatar Aug 22 '18 21:08 jafetmorales

I have this error too, you fixed them? I install this library to python 3

vvssttkk avatar Oct 17 '18 08:10 vvssttkk

I think this is happening because the module tries to install beautifulsoup which is no longer supported by python. It should be beautifulsoup4 instead.

SuryaChandrasekaran avatar Nov 27 '18 20:11 SuryaChandrasekaran

@vtrokhymenko I don't think I fixed since I was just automatically testing hundreds of github packages and automatically posting the detected issues. But indeed it probably has something to do with your version of python since it says you gotta use Python 2.7 in the readme. Maybe you can port it by using beautifulsoup4 instead. So those are probably your two choices.

jafetmorales avatar Nov 27 '18 20:11 jafetmorales

Also, I think the package is getting the BeautifulSoup-3.2.1 module while installing. Maybe the error is on that. I am not sure how can we install pyteaser with beautifulsoup4. We have bs4 dependency in the setup file.

Collecting beautifulsoup (from pyteaser)
  Downloading https://files.pythonhosted.org/packages/1e/ee/295988deca1a5a7accd783d0dfe14524867e31abb05b6c0eeceee49c759d/BeautifulSoup-3.2.1.tar.gz
    Complete output from command python setup.py egg_info:

SuryaChandrasekaran avatar Nov 27 '18 20:11 SuryaChandrasekaran

@SuryaChandrasekaran I've never done that but this is what I would tray:

  1. Change that dependency to beautifulsoup4
  2. Run the installation (which also runs tests.py)
  3. Fix any tests that are not passed
  4. After that I would assume that it works and proceed to use it normally until it breaks

jafetmorales avatar Nov 27 '18 21:11 jafetmorales

don't use the sudo pip install pyteaser, just type the pip install pyteaser, easy fix it

ahlixinjie avatar Dec 06 '18 03:12 ahlixinjie

@vtrokhymenko @SuryaChandrasekaran can you verify @ahlixinjie 's fix?

jafetmorales avatar Dec 06 '18 04:12 jafetmorales

@jafetmorales I just saw your error log, yours is different from mine. Here is my suggestion: Don't use the python3.x, your error log indicates the SyntaxError cause you're using python3! You should use the pyenv to mange different python versions(better use the pyenv-virtualenv to create virtual environments to manage the modules' version for each project). Switch to python2 then pip install pyteaser.

ahlixinjie avatar Dec 06 '18 05:12 ahlixinjie

@jafetmorales This project is fantastic, cause it can get summarization from web directly, which saves pounds of time of parsing the web content to pure text. It's worth to try what i said above.

ahlixinjie avatar Dec 06 '18 05:12 ahlixinjie