ushahidi / geograpy

Extract countries, regions and cities from a URL or text
219 stars 133 forks source link

Cannot install it in Python3 #4

Open spartakos87a opened 9 years ago

spartakos87a commented 9 years ago

When I try it to install to Python3 many errors come up...is there any solution??

HEHenson commented 8 years ago

I am in the same boat

shun-liang commented 8 years ago

I have the same problem. When trying to run geograpy-nltk, I get the following error:

Traceback (most recent call last):
  File "/Users/shun/.virtualenvs/hn_hiring_trend/bin/geograpy-nltk", line 5, in <module>
    nltk.downloader('maxent_ne_chunker')
TypeError: 'module' object is not callable
shun-liang commented 8 years ago

And error when trying to import geograpy:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/shun/.virtualenvs/hn_hiring_trend/lib/python3.5/site-packages/geograpy/__init__.py", line 1, in <module>
    from extraction import Extractor
ImportError: No module named 'extraction'
jamiebull1 commented 8 years ago

+1 for the same error as @shun-liang

The code is clearly not Python 3 ready - it has things like except Error, e: instead of except Error as e:, also reads CSV files using the csv module with files opened with the rb bytestring flag instead of the r flag required in Python 3.

Ireneruru commented 6 years ago

In the same boat;、

yuriy-fineway commented 5 years ago

I got the same problem, but I have 2 errors

  1. Command "python setup.py egg_info" failed with error code 1
  2. WARNING! You are attempting to install newspaper's python2 repository on python3. PLEASE RUN $ pip3 install newspaper3k for python3 or $ pip install newspaper for python2. This one occurs, even though newspaper is installed
RahulKumarSavariya commented 4 years ago

any solution related above error ?

RahulKumarSavariya commented 4 years ago

You can install with this command line python3 -m pip install git+https://github.com/reach2ashish/geograpy.git

if you working on conda virtual environment then python -m pip install git+https://github.com/reach2ashish/geograpy.git

for whole document : https://github.com/ushahidi/geograpy/issues/21

nilani-rangika commented 4 years ago

install geograpy3 for python3

https://pypi.org/project/geograpy3/

mlkshclk commented 4 years ago

@RahulKumarSavariya's suggestion worked for me:

You can install with this command line python3 -m pip install git+https://github.com/reach2ashish/geograpy.git

if you working on conda virtual environment then python -m pip install git+https://github.com/reach2ashish/geograpy.git

for whole document : #21

WolfgangFahl commented 3 years ago

you might want to use the more recent https://github.com/somnathrakshit/geograpy3