osome-iu / hoaxy-backend

Backend component for Hoaxy, a tool to visualize the spread of claims and fact checking
http://hoaxy.iuni.iu.edu/
GNU General Public License v3.0
139 stars 44 forks source link

error when building using the dockerfile #70

Closed RobertAndion closed 2 years ago

RobertAndion commented 2 years ago

When using the docker file the command:

RUN cd hoaxy-backend \ && pip install --upgrade --force-reinstall jieba3k==0.35.1 \ && pip install requests --upgrade \ && python setup.py install

Causes the build to fail with the error below:

Installed /opt/conda/lib/python3.7/site-packages/pathos-0.2.8-py3.7.egg Searching for demjson>=2.2.4 Reading https://pypi.org/simple/demjson/ Downloading https://files.pythonhosted.org/packages/96/67/6db789e2533158963d4af689f961b644ddd9200615b8ce92d6cad695c65a/demjson-2.2.4.tar.gz#sha256=31de2038a0fdd9c4c11f8bf3b13fe77bc2a128307f965c8d5fb4dc6d6f6beb79 Best match: demjson 2.2.4 Processing demjson-2.2.4.tar.gz Writing /tmp/easy_install-0_d5z1sj/demjson-2.2.4/setup.cfg Running demjson-2.2.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-0_d5z1sj/demjson-2.2.4/egg-dist-tmp-lf377spf error: Setup script exited with error in demjson setup command: use_2to3 is invalid. Error: error building at STEP "RUN cd hoaxy-backend && pip install --upgrade --force-reinstall jieba3k==0.35.1 && pip install requests --upgrade && python setup.py install": error while running runtime: exit status 1

RobertAndion commented 2 years ago

Adding this at line 65 after the large conda install seems to fix the issue: RUN conda install -c conda-forge demjson

chathuriw commented 2 years ago

@RobertAndion thank you. I also have a fix in https://github.com/IUNetSci/hoaxy-backend/commit/2f23f453826c6572cd6d8e48a515992e975281df. I think the problem is latest setuptools stopped supporting package 'use_2to3'. (https://exerror.com/error-in-mongoengine-setup-command-use_2to3-is-invalid/). Let me know if you still facing issues.