mikegrudic / pytreegrav

Fast N-body gravitational force and potential in Python
MIT License
63 stars 9 forks source link

pykdgrav import potential fail #1

Closed ttepperg closed 5 years ago

ttepperg commented 5 years ago

Hi,

Apparently, pykdgrav requires a non-standard module, numba, which is not automatically installed when installing pykdgrav via pip, e.g.:

pip install pykdgrav

Unfortunately,

pip install numba

fails.

Any hints on how to get a full, working installation of pykdgrav would be much appreciated.

Thor.

Astrokiwi commented 5 years ago

Hi,

Unfortunately, there’s a whole mess of problems and inconsistencies involved in installing Python libraries, so I’m not going to be able to give very specific advice. If you set up an Anaconda environment for Python, that should have numba with it and behave fairly well. Otherwise, you’ll have to look through the documentation for numba, check your Python and numpy are the right versions, check if you need to set any paths correctly etc.

Alternately, many SPH/N-Body codes have an option to dump the potential at run-time, or have modes where they can read in a snapshot and calculate the gravitational forces and potentials without changing anything. So I would check the documentation for your simulation code too.

There are also other third party codes that you could download and run from the command line - I think SKID from the n-body shop is an old-school code that does potential calculations to find halos, for instance.

Cheers, David

On 6 Jun 2019, at 5:03 am, thor notifications@github.com wrote:

Hi,

Apparently, pykdgrav requires a non-standard module, numba, which is not automatically installed when installing pykdgrav via pip, e.g.:

pip install pykdgrav

Unfortunately,

pip install numba

fails.

Any hints on how to get a full, working installation of pykdgrav would be much appreciated.

Thor.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/omgspace/pykdgrav/issues/1?email_source=notifications&email_token=ACDXXRRHQ4HLEKCMHWB2CH3PZCEC5A5CNFSM4HUX3LUKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GX5QGDQ, or mute the thread https://github.com/notifications/unsubscribe-auth/ACDXXRVBDTCPWBW2ECUWGC3PZCEC5ANCNFSM4HUX3LUA.

mikegrudic commented 5 years ago

Hi Thor,

I wasn't able to reproduce your error - numba installs from PyPI just fine for me. There may be some system dependency that numba needs that you don't have, depending on your OS, etc. I know it relies on a bunch of LLVM stuff. I suggest examining the specific error message returned when you try to install numba.

Best, Mike