Coder Social home page Coder Social logo

Comments (8)

AstroEloy avatar AstroEloy commented on August 29, 2024 1

Ok, I tried and the error does not happen in Python 3.9. It should be the Python version

from reboundx.

dtamayo avatar dtamayo commented on August 29, 2024

Hi Eloy,

Apologies for the slow response. I'm not able to reproduce this issue. Usually when you get errors like this, versions/installations have got mixed up. The first thing to try is to reinstall. If you make a new virtualenv or conda environment and you pip install reboundx, do you get this same error?

from reboundx.

AstroEloy avatar AstroEloy commented on August 29, 2024

From a clean installation in a new environment in MacOS with pip, I got the same error.

from reboundx.

hannorein avatar hannorein commented on August 29, 2024

Everything works fine when I try this:

rein@m1air:~ # mkdir eloytest
rein@m1air:~ # cd eloytest
rein@m1air:~/eloytest # python3 -m venv venv
rein@m1air:~/eloytest # source venv/bin/activate
rein@m1air:~/eloytest # pip install reboundx                                                                        eloytest|
Collecting reboundx
  Using cached reboundx-3.10.1.tar.gz (90 kB)
  Preparing metadata (setup.py) ... done
Collecting rebound>=3.23.0
  Using cached rebound-3.28.3-cp310-cp310-macosx_11_0_arm64.whl (221 kB)
Collecting numpy
  Using cached numpy-1.26.0-cp310-cp310-macosx_11_0_arm64.whl (14.0 MB)
Using legacy 'setup.py install' for reboundx, since package 'wheel' is not installed.
Installing collected packages: rebound, numpy, reboundx
  Running setup.py install for reboundx ... done
Successfully installed numpy-1.26.0 rebound-3.28.3 reboundx-3.10.1
WARNING: You are using pip version 22.0.4; however, version 23.2.1 is available.
You should consider upgrading via the '/Users/rein/eloytest/venv/bin/python3 -m pip install --upgrade pip' command.
rein@m1air:~/eloytest # python                                                                                      eloytest|
Python 3.10.5 (v3.10.5:f377153967, Jun  6 2022, 12:36:10) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import reboundx
>>> import rebound
>>> sim = rebound.Simulation()
>>> sim.add(m=1.)
>>> sim.add(a=1.)
>>> rebx = reboundx.Extras(sim)
>>> mm = rebx.load_operator("modify_mass")
>>> rebx.add_operator(mm)
>>> sim.particles[0].params["tau_mass"] = -1000
>>> gr = rebx.load_force("gr")
>>> rebx.add_force(gr)
>>> gr.params['c'] = 1.e4 # set speed of light
>>> sim.integrate(100.)

What version of MacOS and Python do you use?

from reboundx.

AstroEloy avatar AstroEloy commented on August 29, 2024

I am using Python 3.11.5 on macOS Monterey

from reboundx.

hannorein avatar hannorein commented on August 29, 2024

I've tried it with python 3.11 and still see no problems. I'm not sure why it doesn't work on your side. My only guess is that you might have (accidentally) changed something in your python 3.11 installation.

from reboundx.

AstroEloy avatar AstroEloy commented on August 29, 2024

It looks like... But it is strange that reboundx version 3.9 does not give me this problem. Thank you for the help!

from reboundx.

dtamayo avatar dtamayo commented on August 29, 2024

I also just tried a clean install with python 3.11 and it worked fine for me. It's so tricky to debug these kind of problems! I'll close this for now, but please feel free to open a new one if you run into more problems. Thanks Hanno.

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.