-1

I am following this huggingface github(https://github.com/huggingface/transformers/tree/master/examples/pytorch/summarization) for summarization but not able to install packages from requirements.

Command used:

pip install -r requirements.txt

For your information I am trying this Intel oneapi devcloud.Please find the below error.

env: ‘pkg-config’: No such file or directory
    Failed to find sentencepiece pkg-config
    ----------------------------------------
ERROR: Command "/home/uxxxxx/.conda/envs/env/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/home/uxxxx/tmp/pip-install-ld2o4xe1/sentencepiece/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /home/uxxxxx/tmp/pip-record-tl0qz8f6/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /home/uxxxxx/tmp/pip-install-ld2o4xe1/sentencepiece/

Please use "pip install --user <package>" to install user packages.
Please visit the forums at: https://software.intel.com/en-us/forums/intel-devcloud

Thanks in Advance!

3 Answers3

1

Try installing pkg-config and sentencepiece separately.

sudo apt-get install pkg-config
pip3 install sentencepiece== 0.19.2

Related source: Link

Also, follow the steps which @Abhijeet has mentioned below. That's kinda obvious so not reiterating it.

senarijit1618
  • 389
  • 4
  • 16
0

To make sure you can successfully run the latest versions of the example scripts, you have to install the library from source and install some example-specific requirements.

To do this, execute the following steps in a new virtual environment:

git clone https://github.com/huggingface/transformerscd transformers
pip install .

Then cd in the example folder of your choice and run

pip install -r requirements.txt
0

Try installing sentencepiece through brew then pip install

brew install sentencepiece
pip3 install sentencepiece

Then install the original package you were trying to install

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 24 '22 at 19:49