dtamayo / reboundx

A library for adding additional forces to the REBOUND N-body integration package
GNU General Public License v3.0
80 stars 60 forks source link

Failed building editable for reboundx #117

Closed Bruntonian closed 7 months ago

Bruntonian commented 7 months ago

Hi, my name is Ian, I've been getting used to rebound the past couple months and am now trying to go further by modifying some of the reboundx source code for my specific problem. I've never done that before, and am running into what I assume are some basic issues.

I clone the rebound repository and install no problem. However, attempting to clone reboundx and the more complete install outlined in the guide, I keep getting this error:

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building editable for reboundx
Failed to build reboundx
ERROR: Could not build wheels for reboundx, which is required to install pyproject.toml-based projects

I've tried a few different methods to install, such as requesting an older repository (e.g., git checkout c2f976bb) and still no success. I am able to install reboundx via the "quick installation," but I need to be able to edit.

Any help would be greatly appreciated.

dtamayo commented 7 months ago

Hi Ian,

I can't seem to reproduce the error you're having. These problems with library dependencies can be a real pain to debug and track down. virtual environments and conda environments help a lot, are you using either?

Could you try making a fresh virtualenv or conda environment, checking out the rebound and reboundx repos and then

pip install -e .

in each directory?

Bruntonian commented 7 months ago

Hello Dan,

Thanks for the response. I tried using a virtual environment, once by following the outline in the rebound YouTube tutorial, and a few other tries, such as:

mkdir reboundian
cd reboundian

git clone https://github.com/hannorein/rebound.git
git clone https://github.com/dtamayo/reboundx.git

pip3 install virtualenv
virtualenv venv

source venv/bin/activate

cd rebound
pip install -e .
cd ../reboundx
pip install -e .

At this point, I'm probably just going to get better at C and just run my simulations in the C version.

hannorein commented 7 months ago

I've just tried the exact same commands and everything works for me (Python 3.11.6, macOS Sonoma 14.2). What python version and what operating system are you using?

Bruntonian commented 7 months ago

I'm using Python 3.12.0 and macOS Sonoma 14.2.1

hannorein commented 7 months ago

Just tried it with python 3.12.0 and it also works for me. 🤷‍♂️

Bruntonian commented 7 months ago

Hmm, perhaps I'm screwing something up somewhere, or making an error when I edit the source code... I'll give it another go.