Comments (8)
@minrk :
We refactored build system of NEURON with introduction of CMake and should solve most of the issues described in this ticket. Here are the instructions of how we typically build it.
Now X functionality can be readily available on Linux and OS X (not on Windows yet). There is also setup.py through which we use to generate portable wheels.
I don't know Conda but will be happy to help on anything required to get full functional NEURON available.
from nrn.
Just a slight update. X11 not needed on Windows as NEURON natively uses Windows for its
InterViews GUI. For the mac, we build binary installers which load X11 dynamically at runtime. If
XQuartz has not been installed, then no InterViews graphics appears on the screen but otherwise everything works normally. I believe that closing this issue is appropriate.
from nrn.
Combining the module build into a single setup.py would be useful. I believe crxd will eventually supersede rxd (and may be renamed as rxd) when it is established that they produce the same results. Note that to avoid the long compile times associated with some of the cython generated cpp files, people often add --disable-rx3d to the configure line.
With respect to installing in a standard location, I agree that that is a "good thing". It eliminates the
need to set PYTHONPATH when launching python --- which is a regular source of puzzlement when
"import neuron" fails. (launching nrniv does not require PYTHONPATH but is a bit environmentally trickier since NEURON needs to figure out where python is. nrnpyenv.sh helps here as sometimes PYTHONHOME and NRN_PYLIB are highly nontrivial). The difference between
share/nrn/lib/python and lib/python/neuron are that the latter contains the hoc.so shared library
needed for neuron to be an importable module when python is launched. That file is constructed by
python setup.py ...
It is not necessary when nrniv -python is launched. There are two situations where keeping the
neuron module more tightly associated with the neuron installation (instead of the python installation)
is useful. However, I am willing to make a standard python install the default after getting some
judgment in regard to the distribution problem. That is, a neuron distribution (linux deb, mac pkg, mswin setup.exe) works if python is not installed or if any or all of python2.7, 3.5, 3.6, 3.7 is installed
and any of those can be launched and successfully "import neuron" if there is a appropriate PYTHONPATH. The mac and mswin installers set PYTHONPATH by default. It also allows multiple installations of NEURON and makes uninstallation considerably simpler as everything is under the configuration
from nrn.
Great! Thanks for the detailed info.
Note that to avoid the long compile times associated with some of the cython generated cpp files, people often add --disable-rx3d to the configure line.
Yes, I don't plan to change the conditionals for what is built when, just consolidate them to a single setup.py, so everything should be just as optional as before.
BTW, I'm coming up with all of these because I'm maintaining a conda package of neuron because some folks here are using it for teaching, so if anyone comes to you with issues about neuron+conda/anaconda, feel free to send them my way.
from nrn.
Ah yes. A conda install of NEURON would naturally end up entirely in a module and PYTHONPATH
would not be needed or desirable.
If you consolidate into a single setup.py, I will review and almost certainly accept the pull request.
I'm interested in your conda package. Can you tell me the url? I was defeated by the mac because I
could not figure out how to install xquartz that way (as well as command line tools). I enhanced the
mac pkg postinstall script to do this but it seems to be brittle in the sense of often hanging with the
installer window on the screen even after a successful install of all three packages. I'm toying with
creating an applescript installer driver to do the three installs in sequence without recursive install.
from nrn.
Hi,
Is there any update on this ? I'm willing to help if needed.
Regards
from nrn.
No Update. Just a lot of effort without robust result. I can't speak for minrk's conda installer.
My trivial swat at it for mac is at https://anaconda.org/neuronsimulator/neuron
If you look at the "Files" tab and download oxsx-64/neuron-76-py36_t.tar.bz2 uploaded 7months ago
you can see the info/recipe folder. Using that (import neuron) will fail if XQuartz is not installed (needed for the classical NEURON
InterViews gui) Given all my effort over the past few months working on the trails of a
bash script installer (converted to an app with Platypus) or extending the postinstall script for the
NEURON pkg installer. It would seem possible to have the conda install try to install XQuartz. I wish
I could make x11 dynamically loadable if it exists, just like I do with mpi and python. Not everyone needs
the x11 gui.
from nrn.
Sorry, I didn't notice that you asked for the link. The neuron recipe is here: https://github.com/conda-forge/neuron-feedstock
The following features are missing from those builds:
- it's not building Windows at all, and
- X is disabled across the board
This is because for the use cases that prompted me to package neuron, it is running in a Jupyter notebook and/or a docker container, where the X functionality is not available anyway.
I'd be happy to add you as maintainers on the conda package if you are interested (I mostly don't want to bother package maintainers with conda maintenance, but I'm more than happy to add you if you'd like to work on it).
It would be great if X could be loaded dynamically at runtime, so that the same package works both in a headless container and a desktop with X.
from nrn.
Related Issues (20)
- always use standard C++ regex HOT 3
- Windows CIs failing (again) HOT 1
- segfault with test_version_macros.py HOT 17
- Silence Eigen related warnings with NVHPC?
- Different behaviours from loading an ascii morphology file in hoc and in python HOT 2
- nocmodl: leak and infinite loop in `massagederiv`
- ReadTheDocs: setup integration with a secret - deadline 31/01/2024
- Rewrite nonlinz to use std::complex instead of 2 vectors
- rxd.Rate requires h.finitialize() to be called before it has an effect
- rxd.cpp get_reaction_rates and solve_reaction possibly repeatedly mallocing. HOT 2
- The novel method called "Dendritic Hierarchical Scheduling" (DHS) from the paper of Zhang, He 2023
- Add hook for external `nmodl` executable in `nrnivmodl`
- Releases with Python 3.12 support HOT 1
- Timeout issue in `hoctests::test_nrniv-launch_py`
- Python 3.13 support HOT 3
- Recurring MPI segmentation fault HOT 5
- master bug : could not translate legacy index 10 HOT 3
- Extend model domain of BBSaveState
- nightly wheels upload CI failing : Username/Password authentication is no longer supported by pypi.org HOT 1
- Nameclash for `STATE y`. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nrn.