GoekeLab / m6anet

Detection of m6A from direct RNA-Seq data
https://m6anet.readthedocs.io/
MIT License
100 stars 17 forks source link

installation on linux failed #159

Open mocherry opened 3 months ago

mocherry commented 3 months ago

Dear all,

sorry for continuously bothering you, but I would really need to work with m6anet. Maybe most/all of my problems have to do with me working in a Windows environment. Now that installation with minoconda basicaly worked but produced errors (see previous issues), I have installed wsl on a windows computer. When running:

matthias@mok2022:~/m6anet$ pip install m6anet

I get the following long error message: _error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [58 lines of output] Running from numpy source directory. setup.py:425: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates run_build = parse_setuppy_commands() /tmp/pip-install-9crk2g2q/numpy_754e33d5f3fb459eb810ae52b1c33d46/tools/cythonize.py:75: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. required_version = LooseVersion('0.29.13') /tmp/pip-install-9crk2g2q/numpy_754e33d5f3fb459eb810ae52b1c33d46/tools/cythonize.py:77: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if LooseVersion(cython_version) < required_version:

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      def __init__(self, seed=None):
          BitGenerator.__init__(self, seed)
          self.rng_state.pcg_state = &self.pcg64_random_state

          self._bitgen.state = <void *>&self.rng_state
          self._bitgen.next_uint64 = &pcg64_uint64
                                     ^
  ------------------------------------------------------------

  _pcg64.pyx:113: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/_pcg64.pyx
  Traceback (most recent call last):
    File "/tmp/pip-install-9crk2g2q/numpy_754e33d5f3fb459eb810ae52b1c33d46/tools/cythonize.py", line 238, in <module>
      main()
    File "/tmp/pip-install-9crk2g2q/numpy_754e33d5f3fb459eb810ae52b1c33d46/tools/cythonize.py", line 234, in main
      find_process_files(root_dir)
    File "/tmp/pip-install-9crk2g2q/numpy_754e33d5f3fb459eb810ae52b1c33d46/tools/cythonize.py", line 225, in find_process_files
      process(root_dir, fromfile, tofile, function, hash_db)
    File "/tmp/pip-install-9crk2g2q/numpy_754e33d5f3fb459eb810ae52b1c33d46/tools/cythonize.py", line 191, in process
      processor_function(fromfile, tofile)
    File "/tmp/pip-install-9crk2g2q/numpy_754e33d5f3fb459eb810ae52b1c33d46/tools/cythonize.py", line 80, in process_pyx
      subprocess.check_call(
    File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'cython', '-3', '--fast-fail', '-o', '_pcg64.c', '_pcg64.pyx']' returned non-zero exit status 1.
  Cythonizing sources
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
      main()
    File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 164, in prepare_metadata_for_build_wheel
      return hook(metadata_directory, config_settings)
    File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 174, in prepare_metadata_for_build_wheel
      self.run_setup()
    File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 267, in run_setup
      super(_BuildMetaLegacyBackend,
    File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 158, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 450, in <module>
      setup_package()
    File "setup.py", line 433, in setup_package
      generate_cython()
    File "setup.py", line 240, in generate_cython
      raise RuntimeError("Running cythonize failed!")
  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._

Can anybody help?

Thanks and best, Matthias

yuukiiwa commented 3 months ago

Hi Matthias (tagging you here @mocherry),

You can try installing m6anet in a mamba environment instead to avoid incompatibility in the installation. I do this with windows but using linux.

Install mamba for windows (https://github.com/conda-forge/miniforge)

wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
chmod +x Miniforge3-Linux-x86_64.sh
./Miniforge3-Linux-x86_64.sh

Then close the console and open the console again, and check whether mamba is there:

mamba

After you have mamba, you will then need to install python3.8

mamba create -n py3pt8 python=3.8

You can then activate the mamba environment:

mamba activate py3pt8

And install m6anet with pip:

pip install m6anet

Thanks!

Best wishes, Yuk Kei

mocherry commented 3 months ago

Hi Yuk Kei Wan,thanks I will try as you suggest when I am back in the lab. I am traveling right now.Best,MatthiasVon meinem/meiner Galaxy gesendet -------- Ursprüngliche Nachricht --------Von: Yuk Kei Wan @.> Datum: 17.03.24 20:50 (GMT+01:00) An: GoekeLab/m6anet @.> Cc: mocherry @.>, Mention @.> Betreff: [EXTERN] Re: [GoekeLab/m6anet] installation on linux failed (Issue #159) Hi Matthias (tagging you here @mocherry), You can try installing m6anet in a mamba environment instead to avoid incompatibility in the installation. I do this with windows. Install mamba for windows (https://github.com/conda-forge/miniforge) wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Windows-x86_64.exe

After you have mamba, you will then need to install python3.8 mamba create -n py3pt8 python=3.8

You can then activate the mamba environment: mamba activate py3pt8

And install m6anet with pip: pip install m6anet

Thanks! Best wishes, Yuk Kei

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

rugilemat commented 2 months ago

Hi, I'm having the same error. I tried installing via conda environment too but with no luck.

They recently updated our HPC system so I think it could be related to that as I've previously been able to install and run m6anet without issues.