Coder Social home page Coder Social logo

Comments (7)

hannorein avatar hannorein commented on August 29, 2024

Did you recompile REBOUNDx after upgrading REBOUND? You can find out with:

import rebound
import reboundx
print(rebound.__build__)
print(reboundx.__build__)

from reboundx.

dtamayo avatar dtamayo commented on August 29, 2024

thanks @Rmelikyan . Like @hannorein said, this sounds more likely a version compatibility issue, otherwise none of the unit tests would work. Please feel free to reopen if you think it's something else

from reboundx.

Rmelikyan avatar Rmelikyan commented on August 29, 2024

Of course the tests would catch this... must be a me problem.
Here's what I get for with the versions of rebound and reboundx that are working together

print(f"Rebound Version: {rebound.__version__} and build: {rebound.__build__}")
print(f"ReboundX Version: {reboundx.__version__} and build: {reboundx.__build__}")

Rebound Version: 4.0.3 and build: Jan 5 2024 16:13:23
ReboundX Version: 4.1.0 and build: Feb 3 2024 13:08:37

Then if I pip ugrade rebound:

pip install --upgrade rebound

The above code gives:

Rebound Version: 4.3.2 and build: Feb 19 2024 16:24:51
ReboundX Version: 4.1.0 and build: Feb 3 2024 13:08:37

I'll take it that having a rebound build that is younger than reboundx is a problem. Assuming that reboundx rebuilds when it is installed, I've been trying to pip install and upgrade reboundx and have noticed that it is always drawing rebx from a cached source on my computer (I've used rebx across a number of projects on separate virtual enironments).

Is it necessary for me to get rebx from source and rebuild locally or is there a way to get an updated build with pip commands?

Thanks to you both for your insight @hannorein @dtamayo !

from reboundx.

hannorein avatar hannorein commented on August 29, 2024

You're not the first in this python/pip dependency nightmare. I don't know the right commands out of my head to get out of this mess (maybe something like pip cache purge?).

I think we've convinced ourselves in the past that there is no "perfect" way to avoid this. I personally just built everything from source when I work with REBOUNDx.

from reboundx.

Rmelikyan avatar Rmelikyan commented on August 29, 2024

Yes something like that worked for me!

Following the documentation here:

I executed pip cache remove rebound and pip cache remove reboundx then reinstalled the libraries.

Oddly rebound still reinstalled using a cache of 4.3.2 which I couldn't track down nor remove, but reboundx completely reinstalled and rebuilt (reboundx.build = Apr 2 2024 17:35:17)

Now it's all working! Hopefully this discussion helps others that get trapped in the pip dependency nightmare. It's nice to be able to simply pip install when you're working with a project across multiple machines though it's not too much trouble to install from source.

Cheers!

from reboundx.

hannorein avatar hannorein commented on August 29, 2024

Glad you found a way to make it work.

from reboundx.

dtamayo avatar dtamayo commented on August 29, 2024

An alternative approach is to for each project (or at least when you run into problems) make a new conda environment (or virtual environment) and pip install reboundx. If that doesn't work then there's definitely an issue we need to fix. Thanks for opening issues to help us fix bugs and help other users!

from reboundx.

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.