Git Product home page Git Product logo

Comments (16)

sanboton avatar sanboton commented on June 20, 2024 1

I had to go down to version 3.5.2 to be able to install it

from rpy2.

Yunuuuu avatar Yunuuuu commented on June 20, 2024 1

Had this as well. Using rocker/r2u:jammy as a base I couldn't get the latest version of rpy2 to install, only 3.5.2.

Edit: I solved this with RUN pip3 install --upgrade pip wheel setuptools>51 prior to trying to install rpy2.

This works well

from rpy2.

lgautier avatar lgautier commented on June 20, 2024

What is your version of setuptools?

from rpy2.

sanboton avatar sanboton commented on June 20, 2024

Hi, it's 69.5.1.

pip3 show setuptools
Name: setuptools
Version: 69.5.1
Summary: Easily download, build, install, upgrade, and uninstall Python packages
Home-page: https://github.com/pypa/setuptools
Author: Python Packaging Authority
Author-email: [email protected]
License:
Location: /home/NAME/.local/lib/python3.10/site-packages
Requires:
Required-by: APScheduler

from rpy2.

lgautier avatar lgautier commented on June 20, 2024

I can't reproduce with Ubuntu 22.04, Python 3.10, and the same setuptools. It installs fine. What is your Python version?

from rpy2.

sanboton avatar sanboton commented on June 20, 2024

My version is 3.10.12:

python3 -V
Python 3.10.12

from rpy2.

lgautier avatar lgautier commented on June 20, 2024

The error traceback says that the path is /usr/lib/python3/dist-packages/setuptools/build_meta.py while pip3 show setuptools says that the path is /home/NAME/.local/lib/python3.10/site-packages.

from rpy2.

Hasnae12 avatar Hasnae12 commented on June 20, 2024

Describe the issue or bug

I can't install rpy2 3.5.16 on Ubuntu 22.04.3 LTS

To Reproduce

Open cmd as administrator

pip3 install rpy2 or pip install rpy2

Expected behavior install rpy2

Error

pip3 install rpy2
Defaulting to user installation because normal site-packages is not writeable
Collecting rpy2
  Using cached rpy2-3.5.16.tar.gz (220 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [16 lines of output]
      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 130, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 162, in get_requires_for_build_wheel
          return self._get_build_requires(
        File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 143, in _get_build_requires
          self.run_setup()
        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 23, in <module>
          import setuptools.command.build
      ModuleNotFoundError: No module named 'setuptools.command.build'
      [end of output]

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

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

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

Hi, I have the same issue on Ubuntu 20.04.6 LTS

from rpy2.

lgautier avatar lgautier commented on June 20, 2024

The last mentions

Open cmd as administrator

while the traceback has

Defaulting to user installation because normal site-packages is not writeable

There is a contradiction.

I believe that both error reports result from invalid assumptions by the operators about what Python+libraries are used, or the system ID running the installation process.

from rpy2.

D3SL avatar D3SL commented on June 20, 2024

Had this as well. Using rocker/r2u:jammy as a base I couldn't get the latest version of rpy2 to install, only 3.5.2.

Edit: I solved this with RUN pip3 install --upgrade pip wheel setuptools>51 prior to trying to install rpy2.

from rpy2.

Yunuuuu avatar Yunuuuu commented on June 20, 2024

The same problem

from rpy2.

amano-takahisa avatar amano-takahisa commented on June 20, 2024

Same issues on Ubuntu 24.04.

To reproduce, build container with following Dockerfile:

FROM ubuntu:24.04

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
    r-base \
    r-base-dev \
    python3 \
    python3-pip \
    python3-venv

USER ubuntu
WORKDIR /home/ubuntu

Build and enter the container with docker build -t test_rpy2 . && docker run -it --rm test_rpy2 /bin/bash, and in that container, run:

python3 -m venv .venv
source .venv/bin/activate
pip install -U pip setuptools 
pip install rpy2

Raise the following error.

Details
$ pip install rpy2
Collecting rpy2
  Downloading rpy2-3.5.16.tar.gz (220 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 220.0/220.0 kB 8.1 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [37 lines of output]
/usr/bin/ld: cannot find -ltirpc: No such file or directory
collect2: error: ld returned 1 exit status
Traceback (most recent call last):
File "/tmp/pip-build-env-3em6ull7/overlay/lib/python3.12/site-packages/setuptools/_distutils/unixccompiler.py", line 269, in link
self.spawn(linker + ld_args)
File "/tmp/pip-build-env-3em6ull7/overlay/lib/python3.12/site-packages/setuptools/_distutils/ccompiler.py", line 1041, in spawn
spawn(cmd, dry_run=self.dry_run, **kwargs)
File "/tmp/pip-build-env-3em6ull7/overlay/lib/python3.12/site-packages/setuptools/_distutils/spawn.py", line 68, in spawn
raise DistutilsExecError(f"command {cmd!r} failed with exit code {exitcode}")
distutils.errors.DistutilsExecError: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/home/ubuntu/.venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/home/ubuntu/.venv/lib/python3.12/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/ubuntu/.venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
             ^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-3em6ull7/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-3em6ull7/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
      self.run_setup()
    File "/tmp/pip-build-env-3em6ull7/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
      exec(code, locals())
    File "<string>", line 141, in <module>
    File "<string>", line 121, in get_r_c_extension_status
    File "<string>", line 82, in get_c_extension_status
    File "/tmp/pip-build-env-3em6ull7/overlay/lib/python3.12/site-packages/setuptools/_distutils/ccompiler.py", line 781, in link_executable
      self.link(
    File "/tmp/pip-build-env-3em6ull7/overlay/lib/python3.12/site-packages/setuptools/_distutils/unixccompiler.py", line 271, in link
      raise LinkError(msg)
  distutils.errors.LinkError: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
  [end of output]

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

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

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

pip install 'rpy2<=3.5.12' worked, but not pip install 'rpy2>=3.5.13'.

setuptools is as follows:

$ pip3 show setuptools
Name: setuptools
Version: 69.5.1
Summary: Easily download, build, install, upgrade, and uninstall Python packages
Home-page: https://github.com/pypa/setuptools
Author: Python Packaging Authority
Author-email: [email protected]
License:
Location: /home/ubuntu/.venv/lib/python3.12/site-packages
Requires:
Required-by:

from rpy2.

amano-takahisa avatar amano-takahisa commented on June 20, 2024

I solved my issue with apt-get install libtirpc-dev beforehand.

from rpy2.

lgautier avatar lgautier commented on June 20, 2024

Had this as well. Using rocker/r2u:jammy as a base I couldn't get the latest version of rpy2 to install, only 3.5.2.

Edit: I solved this with RUN pip3 install --upgrade pip wheel setuptools>51 prior to trying to install rpy2.

@D3SL - This seems odd. rpy2 already requires setuptools>=61:

"setuptools >= 61",

from rpy2.

lgautier avatar lgautier commented on June 20, 2024

I solved my issue with apt-get install libtirpc-dev beforehand.

@amano-takahisa - The library is a dependency for R builds (see https://archlinux.org/packages/extra/x86_64/r/) but I was not aware that the headers were also necessary (when build C extensions for rpy2). Did you identify where those headers are required?

from rpy2.

amano-takahisa avatar amano-takahisa commented on June 20, 2024

@lgautier I'm not sure where that the header is required.
I just guessed from the following part of error message.

/usr/bin/ld: cannot find -ltirpc: No such file or directory

from rpy2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.