Xilinx / logicnets

Apache License 2.0
83 stars 27 forks source link

python setup.py egg_info error #33

Closed BalaDhinesh closed 1 year ago

BalaDhinesh commented 1 year ago

Hi all, I tried installing logicnets using ./docker/run-docker.sh and I got the following error.

Mounting LogicNets to /workspace/logicnets inside the docker container
$VIVADO_SETTINGS_FILE defined. Mounting /opt/Vitis_2020.2/Vivado inside the docker container
$XILINXD_LICENSE_FILE not set, Vivado may not have the necessary license within the docker environment.
$LM_LICENSE_FILE not set, Vivado may not have the necessary license within the docker environment.
/opt/Vitis_2020.2/Vivado/2020.2/settings64.sh: line 5: /opt/Vitis_2020.2/DocNav/.settings64-DocNav.sh: No such file or directory
/opt/Vitis_2020.2/Vivado/2020.2/settings64.sh: line 7: /opt/Vitis_2020.2/Vitis/2020.2/.settings64-Vitis.sh: No such file or directory
/opt/Vitis_2020.2/Vivado/2020.2/settings64.sh: line 8: /opt/Vitis_2020.2/Vitis_HLS/2020.2/.settings64-Vitis_HLS.sh: No such file or directory
Processing ./logicnets
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [34 lines of output]
      /home/bala/.local/miniconda3/lib/python3.8/site-packages/setuptools/dist.py:770: UserWarning: Usage of dash-separated 'author-email' will not be supported in future versions. Please use the underscore name 'author_email' instead
        warnings.warn(
      /home/bala/.local/miniconda3/lib/python3.8/site-packages/setuptools/dist.py:770: UserWarning: Usage of dash-separated 'long-description' will not be supported in future versions. Please use the underscore name 'long_description' instead
        warnings.warn(
      /home/bala/.local/miniconda3/lib/python3.8/site-packages/setuptools/dist.py:770: UserWarning: Usage of dash-separated 'long-description-content-type' will not be supported in future versions. Please use the underscore name 'long_description_content_type' instead
        warnings.warn(
      /home/bala/.local/miniconda3/lib/python3.8/site-packages/setuptools/dist.py:770: UserWarning: Usage of dash-separated 'project-urls' will not be supported in future versions. Please use the underscore name 'project_urls' instead
        warnings.warn(
      /home/bala/.local/miniconda3/lib/python3.8/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/workspace/logicnets/setup.py", line 41, in <module>
          setup(use_pyscaffold=True)
        File "/home/bala/.local/miniconda3/lib/python3.8/site-packages/setuptools/__init__.py", line 86, in setup
          _install_setup_requires(attrs)
        File "/home/bala/.local/miniconda3/lib/python3.8/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "/home/bala/.local/miniconda3/lib/python3.8/site-packages/setuptools/dist.py", line 874, in fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/home/bala/.local/miniconda3/lib/python3.8/site-packages/pkg_resources/__init__.py", line 789, in resolve
          dist = best[req.key] = env.best_match(
        File "/home/bala/.local/miniconda3/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1075, in best_match
          return self.obtain(req, installer)
        File "/home/bala/.local/miniconda3/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1087, in obtain
          return installer(requirement)
        File "/home/bala/.local/miniconda3/lib/python3.8/site-packages/setuptools/dist.py", line 944, in fetch_build_egg
          return fetch_build_egg(self, req)
        File "/home/bala/.local/miniconda3/lib/python3.8/site-packages/setuptools/installer.py", line 59, in fetch_build_egg
          eggs_dir = os.path.realpath(dist.get_egg_cache_dir())
        File "/home/bala/.local/miniconda3/lib/python3.8/site-packages/setuptools/dist.py", line 924, in get_egg_cache_dir
          os.mkdir(egg_cache_dir)
      PermissionError: [Errno 13] Permission denied: './.eggs'
      [end of output]

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

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
bala@63bc44852e10:/workspace$ ls

I simply tried running an example and I got No module named 'logicnets' error. Please help me with this @nickfraser. Thanks!

nickfraser commented 1 year ago

Apologies for the delay. For some reason I'm not getting notification emails from github. I'll look into this error and get back to you.

BalaDhinesh commented 1 year ago

I guess the problem is with the docker groupadd command. Commenting lines #45 and #46 in ./docker/Dockerfile.cpu and lines from 30 till 33 in ./docker/run-docker.sh fixed the issue.

nickfraser commented 1 year ago

Removing those environment variables will likely cause other issues, instead I recommend changing these lines to return the correct values for your host system: https://github.com/Xilinx/logicnets/blob/master/docker/run-docker.sh#L19-L22