Errors importing neuron

When Python is the interpreter, what is a good
design for the interface to the basic NEURON
concepts.

Moderator: hines

hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: Errors importing neuron

Post by hines »

I don't see any clear reason for the problem.

To my surprise, I was able to install anaconda2 on comet despite the fact I have no $HOME directory. And I'm seeing no problem running on the login node.

Code: Select all

-bash-4.1$ nrniv -python
NEURON -- VERSION 7.7.0-23-gd28247f9 master (d28247f9) 2019-03-02
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2018
See http://neuron.yale.edu/neuron/credits

>>> import neuron
>>> import sys
>>> sys.version
'2.7.15 |Anaconda, Inc.| (default, Dec 14 2018, 19:04:19) \n[GCC 7.3.0]'
>>> 
-bash-4.1$ python
Python 2.7.15 |Anaconda, Inc.| (default, Dec 14 2018, 19:04:19) 
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import neuron
>>> neuron.version
'7.7.0-23-gd28247f9'
>>> 
-bash-4.1$ 
With no $HOME, everytime I login to comet I have to setup my environment. Here are the notes I use to copy paste fragments

Code: Select all

module load gnu
module load openmpi_ib
module load python

export D=/oasis/scratch/comet/mhines/temp_project
cd $D
#curl -O https://repo.anaconda.com/archive/Anaconda2-2018.12-Linux-x86_64.sh
#sh Anaconda2-2018.12-Linux-x86_64.sh
module unload python
export PATH=$D/anaconda2/bin:$PATH
source /oasis/scratch/comet/mhines/temp_project/anaconda2/etc/profile.d/conda.sh # foe some reason this seems to have no effect but the PATH is good enough

mkdir neuron
cd neuron
git clone http://github.com/neuronsimulator/nrn
cd nrn
sh build.sh
./configure --prefix=`pwd` --without-x --with-paranrn --with-nrnpython=python --disable-rx3d  
make -j install

export PYTHONPATH=$D/neuron/nrn/lib/python:$PYTHONPATH
export PATH=$D/neuron/nrn/x86_64/bin:$PATH

bll5z6
Posts: 29
Joined: Thu May 26, 2016 10:27 am

Re: Errors importing neuron

Post by bll5z6 »

Well I tried your installation commands and it worked! I'm not sure if installing in /oasis/scratch/ instead of $HOME was the cure or something else. Thanks so much!
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: Errors importing neuron

Post by hines »

I would not keep things in scratch as they are deleted automatically at some interval. I know of no reason why you cannot install under $HOME.
The only reason I installed in /oasis/scratch is because my temporary account does not have a $HOME.
I think it is likely that a build in your $HOME will be successful if you do not have things in your environment that conflict with anaconda2.
Post Reply