xiaoxu193 / PyTeaser

Summarizes news articles
http://xiaoxu193.github.io/PyTeaser/
MIT License
1.17k stars 179 forks source link

Error when running pip install pyteaser #57

Open jafetmorales opened 6 years ago

jafetmorales commented 6 years ago

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

vvssttkk commented 6 years ago

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

SuryaChandrasekaran commented 5 years ago

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

jafetmorales commented 5 years ago

@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.

SuryaChandrasekaran commented 5 years ago

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:
jafetmorales commented 5 years ago

@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
ahlixinjie commented 5 years ago

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

jafetmorales commented 5 years ago

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

ahlixinjie commented 5 years ago

@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 commented 5 years ago

@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.