MMF installation fails on Linux (python 3.7) because of demjson==2.2.4 dependency. Stacktrace below.
As a side note, I was working with other projects which required demjson==2.2.4, which is incompatible with py3.7 because the use_2to3 in setuptools fails. The only option (as suggested by the demjson devs and users) was to move to demjson3.
Any ideas on how to install MMF will be helpful.
Thanks,
Priyam
$ pip install --pre --upgrade mmf
Collecting mmf
Using cached mmf-1.0.0rc10-cp37-cp37m-manylinux1_x86_64.whl (404 kB)
Collecting GitPython==3.1.0
Using cached GitPython-3.1.0-py3-none-any.whl (450 kB)
Collecting torch==1.5.0
Using cached torch-1.5.0-cp37-cp37m-manylinux1_x86_64.whl (752.0 MB)
Collecting omegaconf==2.0.1rc4
Using cached omegaconf-2.0.1rc4-py3-none-any.whl (34 kB)
Collecting fasttext==0.9.1
Using cached fasttext-0.9.1.tar.gz (57 kB)
Collecting sklearn==0.0
Using cached sklearn-0.0.tar.gz (1.1 kB)
Collecting lmdb==0.98
Using cached lmdb-0.98.tar.gz (869 kB)
Collecting nltk==3.4.5
Using cached nltk-3.4.5.zip (1.5 MB)
Collecting tqdm>=4.43.0
Using cached tqdm-4.63.0-py2.py3-none-any.whl (76 kB)
Collecting demjson==2.2.4
Using cached demjson-2.2.4.tar.gz (131 kB)
ERROR: Command errored out with exit status 1:
command: /usr1/home/ptejaswi/anaconda3/envs/mmf/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pojc8e0w/demjson_4a55a7dcdadc47e49f2cbf2a8c43e347/setup.py'"'"'; __file__='"'"'/tmp/pip-install-pojc8e0w/demjson_4a55a7dcdadc47e49f2cbf2a8c43e347/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-oq0zc2uz
cwd: /tmp/pip-install-pojc8e0w/demjson_4a55a7dcdadc47e49f2cbf2a8c43e347/
Complete output (1 lines):
error in demjson setup command: use_2to3 is invalid.
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/96/67/6db789e2533158963d4af689f961b644ddd9200615b8ce92d6cad695c65a/demjson-2.2.4.tar.gz#sha256=31de2038a0fdd9c4c11f8bf3b13fe77bc2a128307f965c8d5fb4dc6d6f6beb79 (from https://pypi.org/simple/demjson/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Collecting mmf
Using cached mmf-1.0.0rc9-cp37-cp37m-manylinux1_x86_64.whl (404 kB)
Using cached mmf-1.0.0rc8-cp37-cp37m-manylinux1_x86_64.whl (404 kB)
Collecting numpy==1.16.6
Using cached numpy-1.16.6-cp37-cp37m-manylinux1_x86_64.whl (17.3 MB)
Collecting mmf
Using cached mmf-1.0.0rc7-cp37-cp37m-manylinux1_x86_64.whl (399 kB)
Using cached mmf-1.0.0rc6-cp37-cp37m-manylinux1_x86_64.whl (399 kB)
Using cached mmf-1.0.0rc5-cp37-cp37m-manylinux1_x86_64.whl (418 kB)
Collecting omegaconf==2.0.0rc25
Using cached omegaconf-2.0.0rc25-py3-none-any.whl (32 kB)
Collecting tqdm==4.43.0
Using cached tqdm-4.43.0-py2.py3-none-any.whl (59 kB)
Collecting torchvision==0.5.0
Using cached torchvision-0.5.0-cp37-cp37m-manylinux1_x86_64.whl (4.0 MB)
Collecting mmf
Using cached mmf-1.0.0rc4-cp37-cp37m-manylinux1_x86_64.whl (296 kB)
Using cached mmf-1.0.0rc3-cp37-cp37m-manylinux1_x86_64.whl (294 kB)
Using cached mmf-1.0.0rc2-cp37-cp37m-manylinux1_x86_64.whl (294 kB)
Using cached mmf-1.0.0rc1-cp37-cp37m-manylinux1_x86_64.whl (294 kB)
Using cached mmf-0.9a2-cp37-cp37m-manylinux1_x86_64.whl (246 kB)
Collecting nltk==3.4.1
Using cached nltk-3.4.1.zip (3.1 MB)
Collecting omegaconf==2.0.0rc16
Using cached omegaconf-2.0.0rc16-py3-none-any.whl (28 kB)
Collecting mmf
Using cached mmf-0.9a1-cp37-cp37m-manylinux1_x86_64.whl (202 kB)
Collecting PyYAML==5.1.2
Using cached PyYAML-5.1.2.tar.gz (265 kB)
Collecting pytest==5.4.1
Using cached pytest-5.4.1-py3-none-any.whl (246 kB)
ERROR: Cannot install mmf==0.9a1, mmf==0.9a2, mmf==1.0.0rc1, mmf==1.0.0rc10, mmf==1.0.0rc2, mmf==1.0.0rc3, mmf==1.0.0rc4, mmf==1.0.0rc5, mmf==1.0.0rc6, mmf==1.0.0rc7, mmf==1.0.0rc8 and mmf==1.0.0rc9 because these package versions have conflicting dependencies.
The conflict is caused by:
mmf 1.0.0rc10 depends on demjson==2.2.4
mmf 1.0.0rc9 depends on demjson==2.2.4
mmf 1.0.0rc8 depends on demjson==2.2.4
mmf 1.0.0rc7 depends on demjson==2.2.4
mmf 1.0.0rc6 depends on demjson==2.2.4
mmf 1.0.0rc5 depends on demjson==2.2.4
mmf 1.0.0rc4 depends on demjson==2.2.4
mmf 1.0.0rc3 depends on demjson==2.2.4
mmf 1.0.0rc2 depends on demjson==2.2.4
mmf 1.0.0rc1 depends on demjson==2.2.4
mmf 0.9a2 depends on demjson==2.2.4
mmf 0.9a1 depends on demjson==2.2.4
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
Hello. This is resolved. There was an issue with my Git. Version 2.7 was not able to execute the submodule installation correctly. Updating Git to 2.23.0 or higher works, and mmf install successfully.
MMF installation fails on Linux (python 3.7) because of
demjson==2.2.4
dependency. Stacktrace below. As a side note, I was working with other projects which requireddemjson==2.2.4
, which is incompatible with py3.7 because theuse_2to3
insetuptools
fails. The only option (as suggested by the demjson devs and users) was to move todemjson3
.Any ideas on how to install MMF will be helpful. Thanks, Priyam