-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extras not attatching to sim for Rebound 4.3.2 #122
Comments
Did you recompile REBOUNDx after upgrading REBOUND? You can find out with: import rebound
import reboundx
print(rebound.__build__)
print(reboundx.__build__) |
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 |
Of course the tests would catch this... must be a me problem.
Then if I pip ugrade rebound: pip install --upgrade rebound The above code gives:
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 ! |
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 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. |
Yes something like that worked for me! Following the documentation here: I executed 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! |
Glad you found a way to make it work. |
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! |
I just update rebound from 4.0.3 to 4.3.2 and now I get an error
"Need to attach reboundx.Extras instance to simulation before setting params."
raised by params.py. With some digging I found thatsim.extras
remained NoneType even afterrebx = reboundx.Extras(sim)
for rebound v4.3.2Switching back to 4.0.3 everything is working fine again. I'm not exactly sure where along the version history that the bug was introduced.
I'll be able to continue working in v4.0.3 for now but just wanted to bring this to your attention.
Cheers,
-Robert M
The text was updated successfully, but these errors were encountered: