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

Not able to install jiant #1367

Open
alisheikh1 opened this issue Jul 17, 2024 · 0 comments
Open

Not able to install jiant #1367

alisheikh1 opened this issue Jul 17, 2024 · 0 comments

Comments

@alisheikh1
Copy link

alisheikh1 commented Jul 17, 2024

Describe the bug
running pip install jiant returns an error in preparing metadata pyproject.toml

To Reproduce
I have tried this on multiple machines and on colab. python version 3.10.12
steps to reproduce:
Go to colab and open a new notebook,
run !pip install jiant, the following error is returned.

image

I also tried on another machine with python version 3.10.13,
received the following error and traceback.
image

Defaulting to user installation because normal site-packages is not writeable
Collecting jiant
  Using cached jiant-2.2.0-py3-none-any.whl.metadata (8.5 kB)
Collecting attrs==19.3.0 (from jiant)
  Using cached attrs-19.3.0-py2.py3-none-any.whl.metadata (9.0 kB)
Collecting bs4==0.0.1 (from jiant)
  Using cached bs4-0.0.1.tar.gz (1.1 kB)
  Preparing metadata (setup.py) ... done
Collecting jsonnet==0.15.0 (from jiant)
  Using cached jsonnet-0.15.0.tar.gz (255 kB)
  Preparing metadata (setup.py) ... done
Collecting lxml==4.6.3 (from jiant)
  Using cached lxml-4.6.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl.metadata (3.2 kB)
Collecting datasets==1.1.2 (from jiant)
  Using cached datasets-1.1.2-py3-none-any.whl.metadata (5.8 kB)
Collecting nltk>=3.5 (from jiant)
  Using cached nltk-3.8.1-py3-none-any.whl.metadata (2.8 kB)
Collecting numexpr==2.7.1 (from jiant)
  Using cached numexpr-2.7.1.tar.gz (99 kB)
  Preparing metadata (setup.py) ... done
Collecting numpy==1.18.4 (from jiant)
  Using cached numpy-1.18.4.zip (5.4 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [54 lines of output]
      Running from numpy source directory.
      <string>:461: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
      /scratch/638767/pip-install-mcwsi21w/numpy_d359e368f7864785bfa0844b513bf9a6/tools/cythonize.py:75: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
        required_version = LooseVersion('0.29.14')
      /scratch/638767/pip-install-mcwsi21w/numpy_d359e368f7864785bfa0844b513bf9a6/tools/cythonize.py:77: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
        if LooseVersion(cython_version) < required_version:
      
      Error compiling Cython file:
      ------------------------------------------------------------
      ...
              for i in range(1, RK_STATE_LEN):
                  self.rng_state.key[i] = val[i]
              self.rng_state.pos = i
      
              self._bitgen.state = &self.rng_state
              self._bitgen.next_uint64 = &mt19937_uint64
                                         ^
      ------------------------------------------------------------
      
      _mt19937.pyx:138:35: Cannot assign type 'uint64_t (*)(void *) except? -1 nogil' to 'uint64_t (*)(void *) noexcept nogil'. Exception values are incompatible. Suggest adding 'noexcept' to the type of the value being assigned.
      Processing numpy/random/_bounded_integers.pxd.in
      Processing numpy/random/_mt19937.pyx
      Traceback (most recent call last):
        File "/scratch/638767/pip-install-mcwsi21w/numpy_d359e368f7864785bfa0844b513bf9a6/tools/cythonize.py", line 238, in <module>
          main()
        File "/scratch/638767/pip-install-mcwsi21w/numpy_d359e368f7864785bfa0844b513bf9a6/tools/cythonize.py", line 234, in main
          find_process_files(root_dir)
        File "/scratch/638767/pip-install-mcwsi21w/numpy_d359e368f7864785bfa0844b513bf9a6/tools/cythonize.py", line 225, in find_process_files
          process(root_dir, fromfile, tofile, function, hash_db)
        File "/scratch/638767/pip-install-mcwsi21w/numpy_d359e368f7864785bfa0844b513bf9a6/tools/cythonize.py", line 191, in process
          processor_function(fromfile, tofile)
        File "/scratch/638767/pip-install-mcwsi21w/numpy_d359e368f7864785bfa0844b513bf9a6/tools/cythonize.py", line 80, in process_pyx
          subprocess.check_call(
        File "/usr/local/pace-apps/manual/packages/anaconda3/2023.03/lib/python3.10/subprocess.py", line 369, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/usr/local/pace-apps/manual/packages/anaconda3/2023.03/bin/python', '-m', 'cython', '-3', '--fast-fail', '-o', '_mt19937.c', '_mt19937.pyx']' returned non-zero exit status 1.
      Cythonizing sources
      Traceback (most recent call last):
        File "/home/hice1/msheikh36/.local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/hice1/msheikh36/.local/lib/python3.10/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/hice1/msheikh36/.local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
        File "/scratch/638767/pip-build-env-9ykjhuwg/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 368, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/scratch/638767/pip-build-env-9ykjhuwg/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 497, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/scratch/638767/pip-build-env-9ykjhuwg/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 313, in run_setup
          exec(code, locals())
        File "<string>", line 488, in <module>
        File "<string>", line 469, in setup_package
        File "<string>", line 275, in generate_cython
      RuntimeError: Running cythonize failed!
      [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.

Expected behavior
The package should be installed without error

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

1 participant