ericholscher / django-test-utils

Utilities for testing Django applications
http://django-test-utils.readthedocs.org/
MIT License
343 stars 69 forks source link

Error on installation #45

Closed chalist closed 4 years ago

chalist commented 5 years ago

I got this error:

$ pip install django-test-utils                                                                                                                                                               
Collecting django-test-utils
  Using cached https://files.pythonhosted.org/packages/8f/9d/f80b0fd2bbb24c772650b31a517af70956e2a6a11f2b4cbc4058d8b2c299/django-test-utils-0.3.tar.gz
Collecting BeautifulSoup (from django-test-utils)
  Using cached 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 "/tmp/pip-install-e0zuok91/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 /tmp/pip-install-e0zuok91/BeautifulSoup/

My pip freeze result is:


pip freeze
appnope==0.1.0
certifi==2017.11.5
chardet==3.0.4
cssselect==1.0.1
decorator==4.1.2
Django==1.11.3
django-autocomplete-light==3.2.10
django-ckeditor==5.3.0
django-js-asset==0.1.1
django-keeper==0.1.12
django-registration==2.2
django-tagging==0.4.6
django-taggit==0.22.1
django-widget-tweaks==1.4.1
furl==1.0.1
gunicorn==19.9.0
idna==2.6
imagestore==3.1.0
ipython==6.1.0
ipython-genutils==0.2.0
jedi==0.10.2
Khayyam==3.0.17
lxml==4.1.1
mysqlclient==1.3.12
olefile==0.44
orderedmultidict==0.7.11
pexpect==4.2.1
pickleshare==0.7.4
Pillow==4.2.1
prompt-toolkit==1.0.15
ptyprocess==0.5.2
Pygments==2.2.0
PyMySQL==0.7.11
pyquery==1.3.0
pytz==2017.2
requests==2.18.4
simplegeneric==0.8.1
six==1.10.0
sorl-thumbnail==12.4.1
swapper==1.1.0
traitlets==4.3.2
typing==3.6.4
unicode-slugify==0.1.3
Unidecode==1.0.22
urllib3==1.22
wcwidth==0.1.7

And python version is 3.4.2. I know this error is about python version but I don't know how I can fix this. Thanks for help.

anshulxyz commented 4 years ago

@chalist I think this can be fixed by editing the setup.py's requirements, change this to beautifulsoup4

https://github.com/ericholscher/django-test-utils/blob/136a0b81b6c573361b4af5b548fa7cc4aaa341f1/setup.py#L15

Diff

    install_requires=[
-        'BeautifulSoup',
+        'beautifulsoup4',
        'twill',
    ]

Tell me if this solves the issue.

But to be honest, I wouldn't use django-test-utils altogether since it hasn't been updated since last year and you might run into other compatibility issues.