dependency conflicts
chz816 opened this issue · comments
Hi!
Thank you for this wonderful paper and repo. I meet several dependency conflicts when I try to build the virtual environment.
pip install -r requirements.txt
It returns the following error:
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.
We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
tensorboard 1.14.0 requires setuptools>=41.0.0, but you'll have setuptools 39.0.1 which is incompatible.
tensorflow-gpu 1.14.0 requires numpy<2.0,>=1.14.5, but you'll have numpy 1.14.2 which is incompatible.
thinc 6.10.3 requires wrapt<1.11.0,>=1.10.0, but you'll have wrapt 1.12.1 which is incompatible.
scipy 1.5.2 requires numpy>=1.14.5, but you'll have numpy 1.14.2 which is incompatible.
allennlp 1.0.0 requires spacy<2.3,>=2.1.0, but you'll have spacy 2.0.11 which is incompatible.
If I directly tried to run:
cd src
python run.py --segment --input_files ../data/rst/TRAINING/wsj_110*.out --result_dir ../data/results/
It gives us the following error messages:
ModuleNotFoundError: No module named 'allennlp.commands.elmo'
I believe this message is caused by the version of allennlp (based on https://stackoverflow.com/questions/62884591/modulenotfounderror-no-module-named-allennlp-commands-elmo).
Could you please give me more instructions on how to set up the virtual environment successfully? Thank you!
If I change the setting for allennlp
in requirements.txt
to:
tensorflow_gpu==1.14.0
spacy==2.0.11
allennlp==0.4.2
numpy==1.14.2
It returns the following message:
ERROR: Command errored out with exit status 1:
command: /home/rachelzheng/NeuralEDUSeg/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pkgni0ld/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-pkgni0ld/psycopg2/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-1t6utkud
cwd: /tmp/pip-install-pkgni0ld/psycopg2/
Complete output (23 lines):
running egg_info
creating /tmp/pip-pip-egg-info-1t6utkud/psycopg2.egg-info
writing /tmp/pip-pip-egg-info-1t6utkud/psycopg2.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-1t6utkud/psycopg2.egg-info/dependency_links.txt
writing top-level names to /tmp/pip-pip-egg-info-1t6utkud/psycopg2.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-1t6utkud/psycopg2.egg-info/SOURCES.txt'
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Facing the same error. To avoid this error I tried installing a higher version of allennlp==1.0.0.. but in that case I am getting an error - ModuleNotFoundError: No module named 'allennlp.commands.elmo'
Any help would be appreciated.
If I change the setting for
allennlp
inrequirements.txt
to:tensorflow_gpu==1.14.0 spacy==2.0.11 allennlp==0.4.2 numpy==1.14.2
It returns the following message:
ERROR: Command errored out with exit status 1: command: /home/rachelzheng/NeuralEDUSeg/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pkgni0ld/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-pkgni0ld/psycopg2/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-1t6utkud cwd: /tmp/pip-install-pkgni0ld/psycopg2/ Complete output (23 lines): running egg_info creating /tmp/pip-pip-egg-info-1t6utkud/psycopg2.egg-info writing /tmp/pip-pip-egg-info-1t6utkud/psycopg2.egg-info/PKG-INFO writing dependency_links to /tmp/pip-pip-egg-info-1t6utkud/psycopg2.egg-info/dependency_links.txt writing top-level names to /tmp/pip-pip-egg-info-1t6utkud/psycopg2.egg-info/top_level.txt writing manifest file '/tmp/pip-pip-egg-info-1t6utkud/psycopg2.egg-info/SOURCES.txt' Error: pg_config executable not found. pg_config is required to build psycopg2 from source. Please add the directory containing pg_config to the $PATH or specify the full executable path with the option: python setup.py build_ext --pg-config /path/to/pg_config build ... or with the pg_config option in 'setup.cfg'. If you prefer to avoid building psycopg2 from source, please install the PyPI 'psycopg2-binary' package instead. For further information please check the 'doc/src/install.rst' file (also at <https://www.psycopg.org/docs/install.html>). ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Hey,
I installed psycopg2-binary==2.8.6 and psycopg2==2.8.6 and I could install allennlp==0.4.2 after that. You made need to manually install torch==0.3.1 before installing allennlp.
You may need to refer to https://github.com/allenai/allennlp#installing-via-pip for allennlp installation.
The python version is 3.6.
Hope this solves the issue.
如果我将 in 的设置更改为:
allennlp``requirements.txt
tensorflow_gpu==1.14.0 spacy==2.0.11 allennlp==0.4.2 numpy==1.14.2
它返回以下消息:
ERROR: Command errored out with exit status 1: command: /home/rachelzheng/NeuralEDUSeg/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pkgni0ld/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-pkgni0ld/psycopg2/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-1t6utkud cwd: /tmp/pip-install-pkgni0ld/psycopg2/ Complete output (23 lines): running egg_info creating /tmp/pip-pip-egg-info-1t6utkud/psycopg2.egg-info writing /tmp/pip-pip-egg-info-1t6utkud/psycopg2.egg-info/PKG-INFO writing dependency_links to /tmp/pip-pip-egg-info-1t6utkud/psycopg2.egg-info/dependency_links.txt writing top-level names to /tmp/pip-pip-egg-info-1t6utkud/psycopg2.egg-info/top_level.txt writing manifest file '/tmp/pip-pip-egg-info-1t6utkud/psycopg2.egg-info/SOURCES.txt' Error: pg_config executable not found. pg_config is required to build psycopg2 from source. Please add the directory containing pg_config to the $PATH or specify the full executable path with the option: python setup.py build_ext --pg-config /path/to/pg_config build ... or with the pg_config option in 'setup.cfg'. If you prefer to avoid building psycopg2 from source, please install the PyPI 'psycopg2-binary' package instead. For further information please check the 'doc/src/install.rst' file (also at <https://www.psycopg.org/docs/install.html>). ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
嘿
我安装了 psycopg2-binary==2.8.6 和 psycopg2==2.8.6,之后我可以安装 allennlp==0.4.2。在安装 allennlp 之前,您需要手动安装 torch==0.3.1。您可能需要参考 allennlp 安装 https://github.com/allenai/allennlp#installing-via-pip。
python版本是3.6。希望这能解决问题。
Hello, what is your graphics card driver, my computer using torch0.3.1 will report an error。