[ITK-users] SimpleITK, Python, Local User, Anaconda -- how to install without messing up shared libraries?

Robert.Atwood at diamond.ac.uk Robert.Atwood at diamond.ac.uk
Wed Feb 3 05:42:29 EST 2016


Thank you very much!  The detailed instruction is greatly appreciated (and especially by the other users of the shared installation of Python)

So far  I used the following command:

pip install --user SimpleITK-0.9.1-cp26-none-linux_x86_64.whl

I would make the instruction for such installation:

a) Download the appropriate .whl file from Sourceforge(link) The file name scheme is as follows: SimpleITK-version-PYTHON-????-os-platform.whl, where 'version' is the SimpleITK version, 'PYTHON' (I don't completely understand this version , what are the letters 'cp' for?) is the Python version, ???? is ???? (I don't see what this 'none' is for?), 'os' is the operating system (Linux, win ..) and 'platform' is the hardware platform. (x86-64, i386, etc) 

b) Run the pip command with --user flag and with the target as the downloaded .whl file , e.g. 


pip install --user SimpleITK-version-PYTHON-????-os-platform.whl


This will install the Python library in the user's local file 
~/.local/lib/python.X.x/site-packages

Thanks
Robert

  ____________________
 
  Dr. Robert C. Atwood
  Senior Support Scientist
  Beamline I12-JEEP
  The Joint Engineering and Environmental Processing Beamline
  Diamond Light Source
  The Harwell Science and Innovation Campus
  Didcot,OXON
  OX11 0DE
  +44 (0) 1235 778 670
 


> -----Original Message-----
> From: Yaniv, Ziv Rafael (NIH/NLM/LHC) [C] [mailto:zivrafael.yaniv at nih.gov]
> Sent: 02 February 2016 21:26
> To: Atwood, Robert (DLSLtd,RAL,SCI); insight-users at itk.org
> Subject: Re: [ITK-users] SimpleITK, Python, Local User, Anaconda -- how to
> install without messing up shared libraries?
> 
> Hello Robert,
> 
> We understand our documentation was not sufficiently clear, so we have
> updated our installation instructions page
> (http://www.itk.org/Wiki/SimpleITK/GettingStarted). Hopefully the
> instructions are clearer now.
> 
> Instructions for anaconda:
> 0. See which virtual environments already exist:
>    $ conda info -e
> 1. Assuming sitkpy doesn't exist, create it and install SimpleITK there:
>    $ conda create -n sitkpy -c https://conda.binstar.org/simpleitk
> python=3.4 anaconda SimpleITK
> 2. Activate the environment and start working:
>    $ source activate sitkpy
> 
> 
> If there is no binary distribution for your operating system, step 1 fails, then
> you will have to build from source using our conda-recipe:
> 
>    $ git clone https://github.com/conda/conda-recipes.git
>    $ cd conda-recipes
>    $ conda build simpleitk
> 
> This will take a while as it will download the source and compile everything.
> We assume you have git and a supported compiler installed. For more
> information on conda recipes see the conda documentation
> http://conda.pydata.org/docs/building/recipe.html.
> 
>     Ziv
> 
> 
> 
> 
> 
> 
> 
> On 2/2/16, 6:58 AM, "Robert.Atwood at diamond.ac.uk"
> <Robert.Atwood at diamond.ac.uk> wrote:
> 
> >
> >Hi, ITK people!
> >
> >
> >I don't maintain the Python installation at work so I know little about
> >all the intricacies of python modules and distributions and path
> >searching and so on.
> >What I do know is that if I follow the instructions for including
> >SimpleITK as on the web page for Anacoda installation, everyone gets
> >very angry.
> >That is because it automatically resolves some dependencies in a way
> >that breaks other people's applications, and it does this within the
> >shared Python Anaconda installation on the cluster shared file system.
> >
> >It was suggested (strongly) that I "use the --user option of pip"  .
> >However I cannot get this to do anything by following the pip
> >instruction on the SimpleITK web site, I know nothing of eggs and
> >wheels nor pipit nor "more complicated commands. "
> >
> >Does anyone know the magic incantation to do what I want?  Is there an
> >Anaconda command that does it?
> >
> >
> >Instructions from website with questions annotated:
> >
> >Wheels [ Recommended ]
> >You need a recent version of pip ( >= 6.0, newer is better) to install
> >wheels. Please go to pip homepage for more information about installation.
> >Once you have pip, the package can be installed:
> >$ pip install --allow-external SimpleITK --trusted-host
> >www.simpleitk.org SimpleITK  --timeout 30 SimpleITK
> >Note: We do have window wheels hosted on pypi, but due to size and
> >Linux binary restrictions neither OS X nor Linux are hosted on pipit,
> >so the more complicated command is needed(1).
> >However, you may need to manually download the file(2) from SourceForge.
> >And specify it (3) on the command line if the automatic search does not
> >work.
> >
> >(1) What is the 'more complicated command' ???
> >(2) Which file? An egg? Wheel? Huh?
> >(3) Specify what? How (what is the syntax for specifying 'it' )?
> >
> >
> >Output of session trying to follow the instructions.
> >
> >$ pip install --user --allow-external SimpleITK --trusted-host
> >www.simpleitk.org SimpleITK  --timeout 30 SimpleITK Double requirement
> >given: SimpleITK (already in SimpleITK,
> >name='SimpleITK')
> >You are using pip version 7.1.2, however version 8.0.2 is available.
> >You should consider upgrading via the 'pip install --upgrade pip' command.
> >[kny48981 at i12-ws011 6137]$ pip install --user --allow-external SimpleITK
> >--trusted-host www.simpleitk.org   --timeout 30 SimpleITK
> >Collecting SimpleITK
> >  Could not find a version that satisfies the requirement SimpleITK
> >(from
> >versions: )
> >No matching distribution found for SimpleITK You are using pip version
> >7.1.2, however version 8.0.2 is available.
> >You should consider upgrading via the 'pip install --upgrade pip' command.
> >[kny48981 at i12-ws011 6137]$ pip install --user --allow-external
> >SimpleITK --trusted-host www.simpleitk.org SimpleITK Collecting
> >SimpleITK
> >  Could not find a version that satisfies the requirement SimpleITK
> >(from
> >versions: )
> >No matching distribution found for SimpleITK You are using pip version
> >7.1.2, however version 8.0.2 is available.
> >You should consider upgrading via the 'pip install --upgrade pip' command.
> >[kny48981 at i12-ws011 6137]$ pip install --user --allow-external
> >--trusted-host www.simpleitk.org SimpleITK Collecting www.simpleitk.org
> >  Could not find a version that satisfies the requirement
> >www.simpleitk.org (from versions: ) No matching distribution found for
> >www.simpleitk.org You are using pip version 7.1.2, however version
> >8.0.2 is available.
> >You should consider upgrading via the 'pip install --upgrade pip' command.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >--
> >This e-mail and any attachments may contain confidential, copyright and
> >or privileged material, and are for the use of the intended addressee
> >only. If you are not the intended addressee or an authorised recipient
> >of the addressee please notify us of receipt by returning the e-mail
> >and do not use, copy, retain, distribute or disclose the information in
> >or attached to the e-mail.
> >Any opinions expressed within this e-mail are those of the individual
> >and not necessarily of Diamond Light Source Ltd.
> >Diamond Light Source Ltd. cannot guarantee that this e-mail or any
> >attachments are free from viruses and we cannot accept liability for
> >any damage which you may sustain as a result of software viruses which
> >may be transmitted in or with the message.
> >Diamond Light Source Limited (company no. 4375679). Registered in
> >England and Wales with its registered office at Diamond House, Harwell
> >Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United
> >Kingdom
> >
> >_____________________________________
> >Powered by www.kitware.com
> >
> >Visit other Kitware open-source projects at
> >http://www.kitware.com/opensource/opensource.html
> >
> >Kitware offers ITK Training Courses, for more information visit:
> >http://www.kitware.com/products/protraining.php
> >
> >Please keep messages on-topic and check the ITK FAQ at:
> >http://www.itk.org/Wiki/ITK_FAQ
> >
> >Follow this link to subscribe/unsubscribe:
> >http://public.kitware.com/mailman/listinfo/insight-users


-- 
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. 
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom



More information about the Insight-users mailing list