google-deepmind/ferminet

Installation Error

Closed this issue · 7 comments

Hello, I am trying to install ferminet in Windows Subsystem Linux using command pip install -e '.[tensorflow-gpu]' and I am getting this error: ERROR: File "setup.py" not found. Directory cannot be installed in editable mode.

Please help to solve this error!

You need to be in the root directory of the repository. The file setup.py (https://github.com/deepmind/ferminet/blob/master/setup.py) should be in the working directory.

Also prefer to use the JAX branch over the TF branch, unless you have compelling reasons not to.

I did what you said and it worked. Thank you. Now I am getting a new error could you please help me solve this as well.

ERROR:
Running setup.py develop for ferminet
ERROR: Command errored out with exit status 1:
command: /home/pray/myproject/ferminet/bin/python3.7 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/pray/myproject/setup.py'"'"'; file='"'"'/home/pray/myproject/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'"'"'))' d evelop --no-deps
cwd: /home/pray/myproject/
Complete output (14 lines):
running develop
running egg_info
creating ferminet.egg-info
writing ferminet.egg-info/PKG-INFO
writing dependency_links to ferminet.egg-info/dependency_links.txt
writing requirements to ferminet.egg-info/requires.txt
writing top-level names to ferminet.egg-info/top_level.txt
writing manifest file 'ferminet.egg-info/SOURCES.txt'
reading manifest file 'ferminet.egg-info/SOURCES.txt'
writing manifest file 'ferminet.egg-info/SOURCES.txt'
running build_ext
Creating /home/pray/myproject/ferminet/lib/python3.7/site-packages/ferminet.egg-link (link to .)
Adding ferminet 0.2 to easy-install.pth file
error: [Errno 2] No such file or directory: '/home/pray/myproject/bin/ferminet'
----------------------------------------
ERROR: Command errored out with exit status 1: /home/pray/myproject/ferminet/bin/python3.7 -c 'import io, os, sys, se tuptools, tokenize; sys.argv[0] = '"'"'/home/pray/myproject/setup.py'"'"'; file='"'"'/home/pray/myproject/setup.p y'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from s etuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(co de, file, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

I am also getting this error.

ERROR: optax 0.1.0 has requirement typing-extensions~=3.10.0, but you'll have typing-extensions 4.0.1 which is incompatible.

I think there is a compatibility issue that is causing installation problems.

  1. It is not easy to debug the "directory not found" without knowing your system, file layout and the command used to (attempt to) install ferminet. Please consult the python packaging documentation. In this case, the file bin/ferminet (relative to the repository root) certainly does exist (https://github.com/deepmind/ferminet/blob/jax/bin/ferminet)
  2. I have verified installing in a fresh virtual environment works and does not trigger a conflict with the version of typing-extensions. In this case, either ensure you are installing into a fresh virtual environment (preferable) or install optax from HEAD, where the version requirement is relaxed, before installing ferminet.

I was able to resolve optax error by installing it from HEAD. I am still getting the 'directory not found' error. The command I am using to install ferminet from JAX branch is pip install -e .

This comes up before the error shows up: Running setup.py develop for ferminet

Below is the screenshot of my file layout in Windows Subsystem Linux.
Screenshot 2021-12-14 151121

I am using python 3.7.12 on Linux.

Is there a different approach that I should use for installing Ferminet?

It appears you just downloaded the setup.py file -- where are all the other files in the ferminet repository? You need to clone the entire repository to your local disk first and then follow the installation commands given in the README for inside the ferminet repository.

I thought the command pulls ferminet from the git hub repository, anyway I downloaded the repository into my working directory as you said and it worked.

Thank you for helping me out.