question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error in Installation

See original GitHub issue

I am trying to install sentence transformers library with Python 3.7 in a virtual environment. I have installed pytorch 1.4 in same conda environment.

I am using REDHAT.

But I am facing below error while installation. I have tried with direct pip installation and by checking out code and used pip -e option. Kindly help.

Using cached sentencepiece-0.1.83.tar.gz (497 kB)
  ERROR: Command errored out with exit status 1:
   command: /power8nfs/home/ai_u/.conda/envs/tanveer/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6kz16kgn/sentencepiece/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6kz16kgn/sentencepiece/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-install-6kz16kgn/sentencepiece/pip-egg-info
       cwd: /tmp/pip-install-6kz16kgn/sentencepiece/
  Complete output (7 lines):
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-6kz16kgn/sentencepiece/setup.py", line 29, in <module>
      with codecs.open(os.path.join('..', 'VERSION'), 'r', 'utf-8') as f:
    File "/power8nfs/home/ai_u/.conda/envs/tanveer/lib/python3.7/codecs.py", line 904, in open
      file = builtins.open(filename, mode, buffering)
  FileNotFoundError: [Errno 2] No such file or directory: '../VERSION'
  ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nreimerscommented, Feb 17, 2020

The issue is with the installation of sentence piece. Sadly not sure what the issue is there.

You could try to install sentence transformers without dependencies:

pip install --no-deps sentence-transformers 

And than install individually the different dependencies:

https://github.com/UKPLab/sentence-transformers/blob/master/requirements.txt

transformers requires sentence piece for the XLM-R model. Maybe you need to install it also without dependencies.

Without sentence piece, all models except the XLM-RoBERTa model will work. So you can still use BERT or RoBERTa models for your task.

Best Nils Reimers

0reactions
nreimerscommented, Feb 18, 2020

Great that it worked and thanks for posting the solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to troubleshoot Windows Installer errors - Microsoft Support
Right-click the Windows Installer service, and then click Start. The service should start without errors. Try to install or to uninstall again.
Read more >
How to Fix Microsoft Windows 10 Installation Error Codes
Error Codes while installing Windows 10 and their corresponding solutions · Go to C: drive. · Click View and check the Hidden Files...
Read more >
[SOLVED] Windows 10 Installation Has Failed - Driver Easy
The “Windows 10 installation has failed” error is one of the most reported errors that users get when they try to install Windows...
Read more >
Fixed: “There is a problem with this Windows installer package ...
Your computer doesn't meet the minimum requirements. Some applications may return the “There is a problem with this Windows installer package” error if...
Read more >
If an error occurred while updating or installing macOS
The message might say that an error occurred while downloading, preparing, or installing, or that the installer is damaged or could not be ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found