pheon
pheon

Reputation: 3009

How to install a package not supported by condas

I am trying out Anaconda on OS X and need to install the python package "npTDMS".

I tried

conda install nptdms

which gave me an error

Error: No packages found in current osx-64 channels matching: nptdms You can search for this package on Binstar with

binstar search -t conda nptdms

So I tried that which found a package auto/nptdms for linux-64, which I assume won't work.

So, after some digging, I found instructions here

and tried

conda skeleton pypi npTDMS
conda build npTMDS

which seemed to work (the tests passed.)

But then

import nptmds

returns

ImportError: No module named nptdms

So I tried

conda pipbuild nptdms

which finished after a while with the error

Error: package/name must be lowercase, got: u'npTDMS'

Can someone point me to a better set of instruction?

Upvotes: 7

Views: 15881

Answers (3)

genomer
genomer

Reputation: 1

Conda environments (default 'root' on install) encapsulate and manage recipes that can leverage other package managers like pip (anaconda/bin/pip). If the conda environment you want to install a PYTHON package into is already active in your path, then you can directly use pip. If not, you should use the full path to pip within the conda environment directory you want to install to.

Also, you can always check conda channels to look for builds/recipes of packages that aren't available by default in pip or conda. This includes non-python packages. Many of these channels are discipline-specific.

For example, I routinely use the bioconda channel which includes bioinformatics recipes. This is how I actively manage software like the bowtie2 aligner.

$ conda config --add channels bioconda
$ conda install bowtie2

Upvotes: 0

Lalit Patel
Lalit Patel

Reputation: 126

pip is a package manager for Python. As I understand: conda can be used as a package manager for Python and other languages, as an inspection manager, etc.

Upvotes: 1

iayork
iayork

Reputation: 6699

pip install npTDMS

There's nothing magical about Python run by Conda. It can have access to Python packages anywhere, so long as they're in your path. Installing a package through the simplest way (generally pip or easy_install) should work fine.

(Also, "import nptmds" is not correct; try "from nptdms import TdmsFile")

Upvotes: 9

Related Questions