facebookresearch / BLINK

Entity Linker solution
MIT License
1.17k stars 231 forks source link

BLINK installation failed #99

Open wygao8 opened 3 years ago

wygao8 commented 3 years ago

Hi, I followed instructions to install BLINK with the given command but failed. pip install -e git+git@github.com:facebookresearch/BLINK#egg=BLINK

It threw an error as follows:

ERROR: git+git@github.com:facebookresearch/BLINK#egg=BLINK is not a valid editable requirement. 
It should either be a path to a local project or a VCS URL (beginning with bzr+http, bzr+https, bzr+ssh, bzr+sftp, bzr+ftp, bzr+lp, bzr+file, git+http, git+https, git+ssh, git+git, git+file, hg+file, hg+http, hg+https, hg+ssh, hg+static-http, svn+ssh, svn+http, svn+https, svn+svn, svn+file).

So I slightly revised the command as follows and it worked well. pip install -e git+https://github.com/facebookresearch/BLINK.git#egg=BLINK

jingjing-unilu commented 2 years ago

I got error...

Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [14 lines of output] error: Multiple top-level packages discovered in a flat-layout: ['img', 'elq', 'blink', 'elq_slurm_scripts'].

  To avoid accidental inclusion of unwanted files or directories,
  setuptools will not proceed with this build.

  If you are trying to create a single distribution with multiple packages
  on purpose, you should not rely on automatic discovery.
  Instead, consider the following options:

  1. set up custom discovery (`find` directive with `include` or `exclude`)
  2. use a `src-layout`
  3. explicitly set `py_modules` or `packages` with a list of names

  To find more information, look for "package discovery" on setuptools docs.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

edpark commented 2 years ago

Here's what I found I had to do in order to install:

  1. Run pip install -e git+https://github.com/facebookresearch/BLINK.git#egg=BLINK
  2. cd to src/blink and create a file called pyproject.toml
  3. add contents:
    
    [project]
    name = "BLINK"
    version="0.1.0"

[tool.setuptools] py-modules = []


4. Re-run Step 1
Soumyadipta-Maiti commented 1 year ago

I am still getting same error. Can anyone pls help me to downlaod BLINK & use it in my local python environment.

image

Reze-Joe commented 1 year ago

I am still getting same error. Can anyone pls help me to downlaod BLINK & use it in my local python environment.

image

I got the solution, after step 3 please run cd ../.. back to your own project root path, and then rerun step 1.