Comments (16)
I had to go down to version 3.5.2 to be able to install it
from rpy2.
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.
What is your version of setuptools
?
from rpy2.
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.
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.
My version is 3.10.12:
python3 -V
Python 3.10.12
from rpy2.
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.
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.
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.
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.
The same problem
from rpy2.
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 1During 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 notpip 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 commented on June 20, 2024
I solved my issue with
apt-get install libtirpc-dev
beforehand.from rpy2.
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:
Line 3 in ae74c26
from rpy2.
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 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)
- Installation regression from 3.5.12 to 3.5.13 in Rocky 8 Linux with R 4.3.1 HOT 4
- cannot load library
- problem installing on mac HOT 5
- rpy2 tests fail with Python 3.13 (in alpha now) HOT 2
- Issues Integrating Library Functions with Python via rpy2 HOT 2
- rpy2 cannot properly call the DataFrame object within the S4Vectors package. HOT 2
- Issue converting R data frame to Pandas data frame HOT 1
- rpy2 cannot resolve the correct on Mac M1 HOT 1
- BoolVector to array conversion behaves unexpectedly HOT 3
- Installation on linux platform HOT 1
- NotImplementedError: Conversion rules for `rpy2.robjects` appear to be missing. Those rules are in a Python contextvars.ContextVar. This could be caused by multithreading code not passing context to the thread. HOT 2
- Not an rpy2 R object and unable to map it to one: 'value' HOT 2
- PEP 517 builds rpy2 fails to install on Windows HOT 2
- Error in Colab, rmagic and pandas 2.x HOT 2
- Unable to install rpy2 in centos7/rhel7 with R4.4.0 HOT 1
- vector complex test failed on riscv64 HOT 5
- Cannot import packages HOT 1
- unable to load shared object '/usr/lib/R/library/methods/libs/methods.so': /usr/lib/R/library/methods/libs/methods.so: undefined symbol: R_typeToChar
- Segfault in `test_embedded_r.py` HOT 10
Recommend Projects
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
TensorFlow
An Open Source Machine Learning Framework for Everyone
Django
The Web framework for perfectionists with deadlines.
Laravel
A PHP framework for web artisans
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.
Visualization
Some thing interesting about visualization, use data art
Game
Some thing interesting about game, make everyone happy.
Recommend Org
We are working to build community through open source technology. NB: members must have two-factor auth.
Microsoft
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba
Alibaba Open Source for everyone
D3
Data-Driven Documents codes.
Tencent
China tencent open source team.
from rpy2.