Member-only story

How to install niftynet successfully

Ke Gui
1 min readSep 19, 2018

--

I have been struggling to install niftynet on my old windows 7, and always got error messages back. Here is the procedure that works:

Ok to install the latest dev version,
now this should work (with cpu-only) :

conda create -n nntest python=3.5 
source activate nntest
pip install tensorflow==1.7
pip install -r https://raw.githubusercontent.com/NifTK/NiftyNet/dev/requirements-cpu.txt
pip install git+https://github.com/NifTK/NiftyNet.git

with gpu:

conda create -n nntest python=3.5 
source activate nntest
pip install tensorflow-gpu==1.7
pip install -r https://raw.githubusercontent.com/NifTK/NiftyNet/dev/requirements-gpu.txt
pip install git+https://github.com/NifTK/NiftyNet.git
activate niftynet

conda install nb_conda_kernels
jupyter notebook

deactivate at the end.

to create a new environment (let’s say the env name is N here)from file:

activate N

conda create -f n.yml #n.txt doesn’t work here

conda env remove -n N

conda env create -f n.yml -n N # you will need to explicitly give a name here

if you want to install everything in one go:

Once you install all the packages to your environment, you can:

conda env export > env_all_setup_files.yml

Then run:

conda env create -f env_all_setup_files.yml -n your_env_name

that will install everything, including niftynet in one go.

You may need to install SimpleITK and nb_conda_kernels manually before you start your notebook.

pip install SimpleITKconda install nb_conda_kernelsjupyter notebook

--

--

Ke Gui
Ke Gui

Written by Ke Gui

An ordinary guy who wants to be the reason someone believes in the goodness of people. He is living at Brisbane, Australia, with a lovely backyard.

No responses yet