OpenUpSA / wazimap-za

The ZA implementation of Wazimap, a Django application for exploring census and other similar data
http://wazimap.co.za
MIT License
16 stars 12 forks source link

Installation with python3 fails due to dependancy failure on wsgiref #311

Closed bretton closed 4 years ago

bretton commented 4 years ago

This is the cobbled together process I'm following to try get Wazimap installed with a Python3 virtual environment.

git clone https://github.com/OpenUpSA/wazimap-za wazimap_ww
cd wazimap_ww
virtualenv -p python3 env
source env/bin/activate

My current versions of software differ from the items in requirements.txt

| $ gdal-config --version
| 3.1.2
| django-admin --version
| 2.2.15

So I tried editing requirements.txt to the following, based on issues and pull requests:

Django>=1.11.29
django-test-without-migrations>=0.4
gevent>=1.2.2
greenlet>=0.4.13
gunicorn>=19.7.1
django-appconf>=1.0.2
git+https://github.com/OpenUpSA/wazimap.git@releases#egg=wazimap
#wazimap[gdal]==1.1.1
GDAL>=1.11.0
Shapely>=1.5.13

and made runtime.txt

python-3.5.2

then

pip3 install -r requirements.txt

but it fails on:

Collecting wsgiref>=0.1.2
  Using cached wsgiref-0.1.2.zip (37 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/user/wazimap_ww/env/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-saxt5f_o/wsgiref/setup.py'"'"'; __file__='"'"'/tmp/pip-install-saxt5f_o/wsgiref/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-jm0wcv2p
         cwd: /tmp/pip-install-saxt5f_o/wsgiref/
    Complete output (8 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-saxt5f_o/wsgiref/setup.py", line 5, in <module>
        import ez_setup
      File "/tmp/pip-install-saxt5f_o/wsgiref/ez_setup/__init__.py", line 170
        print "Setuptools version",version,"or greater has been installed."
                                 ^
    SyntaxError: Missing parentheses in call to 'print'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Apparently wsgiref is included in Python3 so this dependency failing is unnecessary, but I can't proceed unless resolved.

How can I resolve?

adieyal commented 4 years ago

Hi Bretton

Apologies for the slow reply - I only just noticed your message. Unfortunately, Wazimap doesn't support python 3. I think the Hurumap team have migrated it but I haven't investigated. We're no longer supporting Wazimap in favour of the new version we're building:

https://github.com/openupsa/wazimap-ng https://github.com/openupsa/wazimap-ng-ui

Depending on what you're looking for, it might be a better platform for your needs. It's also under active development which means we'll be responsive to bug fixes and feature requests. Let me know if you have any questions.