Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while installing #1965

Closed
surya-narayanan opened this issue Jun 14, 2024 · 1 comment
Closed

Error while installing #1965

surya-narayanan opened this issue Jun 14, 2024 · 1 comment

Comments

@surya-narayanan
Copy link

Anyone getting this error while installing? I just created a fresh environment in my Ubuntu / Linux VM and followed the installation instructions (git clone, cd, pip install)

Defaulting to user installation because normal site-packages is not writeable
Obtaining file:https:///home/user/lm-evaluation-harness
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing editable metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [75 lines of output]
      ModuleNotFoundError while trying to load entry-point bdist_wheel: No module named '_ctypes'
      running dist_info
      creating /tmp/pip-modern-metadata-jutws4fo/lm_eval.egg-info
      writing /tmp/pip-modern-metadata-jutws4fo/lm_eval.egg-info/PKG-INFO
      writing dependency_links to /tmp/pip-modern-metadata-jutws4fo/lm_eval.egg-info/dependency_links.txt
      writing entry points to /tmp/pip-modern-metadata-jutws4fo/lm_eval.egg-info/entry_points.txt
      writing requirements to /tmp/pip-modern-metadata-jutws4fo/lm_eval.egg-info/requires.txt
      writing top-level names to /tmp/pip-modern-metadata-jutws4fo/lm_eval.egg-info/top_level.txt
      writing manifest file '/tmp/pip-modern-metadata-jutws4fo/lm_eval.egg-info/SOURCES.txt'
      reading manifest file '/tmp/pip-modern-metadata-jutws4fo/lm_eval.egg-info/SOURCES.txt'
      adding license file 'LICENSE.md'
      writing manifest file '/tmp/pip-modern-metadata-jutws4fo/lm_eval.egg-info/SOURCES.txt'
      creating '/tmp/pip-modern-metadata-jutws4fo/lm_eval-0.4.2.dist-info'
      Traceback (most recent call last):
        File "/home/user/.local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/user/.local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/user/.local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 181, in prepare_metadata_for_build_editable
          return hook(metadata_directory, config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-uo6rkjff/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 453, in prepare_metadata_for_build_editable
          return self.prepare_metadata_for_build_wheel(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-uo6rkjff/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 366, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/tmp/pip-build-env-uo6rkjff/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 5, in <module>
        File "/tmp/pip-build-env-uo6rkjff/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-uo6rkjff/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 184, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-uo6rkjff/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-uo6rkjff/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-uo6rkjff/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 968, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-uo6rkjff/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-uo6rkjff/overlay/lib/python3.11/site-packages/setuptools/command/dist_info.py", line 97, in run
          bdist_wheel = self.get_finalized_command('bdist_wheel')
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-uo6rkjff/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 302, in get_finalized_command
          cmd_obj = self.distribution.get_command_obj(command, create)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-uo6rkjff/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 861, in get_command_obj
          klass = self.get_command_class(command)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-uo6rkjff/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 715, in get_command_class
          self.cmdclass[command] = cmdclass = ep.load()
                                              ^^^^^^^^^
        File "/usr/local/lib/python3.11/importlib/metadata/__init__.py", line 202, in load
          module = import_module(match.group('module'))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
          return _bootstrap._gcd_import(name[level:], package, level)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
        File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
        File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
        File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
        File "<frozen importlib._bootstrap_external>", line 940, in exec_module
        File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
        File "/tmp/pip-build-env-uo6rkjff/overlay/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 27, in <module>
          from .macosx_libfile import calculate_macosx_platform_tag
        File "/tmp/pip-build-env-uo6rkjff/overlay/lib/python3.11/site-packages/wheel/macosx_libfile.py", line 43, in <module>
          import ctypes
        File "/usr/local/lib/python3.11/ctypes/__init__.py", line 8, in <module>
          from _ctypes import Union, Structure, Array
      ModuleNotFoundError: No module named '_ctypes'
      [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.
@andrew0411
Copy link

It looks like you didn't install full python in your environment, and the errors have nothing to do with this project.
Checking https://stackoverflow.com/questions/27022373/python3-importerror-no-module-named-ctypes-when-using-value-from-module-mul might help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants