W. Stine
W. Stine

Reputation: 121

How can I install a Third-Party Package in Python Canopy?

I am currently attempting to install a third-party package (gnuradio, to be specific) into the Canopy version of Python on an Ubuntu computer. I currently have the entire package stored in my filesystem as a folder with subfolders and python files; however, I have been able to find no information as to how to make the transition into a functionally installed and recognized package. How can I do so?

Upvotes: 0

Views: 642

Answers (2)

Jonathan March
Jonathan March

Reputation: 5810

(1) Python packaging is inconsistent, but in general, it suffices to type python setup.py install from the package's top directory (see https://docs.python.org/2/install/#the-new-standard-distutils)

(2) How to be sure that you are installing into Canopy Python rather than your system Python? See https://support.enthought.com/entries/23389761-Installing-packages-into-Canopy-Python-from-the-command-line (tl;dr open a Canopy Terminal window from the Canopy Tools menu.)

EDIT: Marcus Müller has clarified below that gnuradio is not a python package, so this general advice is true but irrelevant. See his answer below.

Upvotes: 0

Marcus Müller
Marcus Müller

Reputation: 36433

You shouldn't use third party pythons on Ubuntu, unless you very exactly know what you're doing (you don't). Ubuntu keeps your python up-to-date and uses the package manager to install pack

So, setting up a recent version of python is just

sudo apt-get install python

So if you still want to integrate GNU Radio into your canopy installation, you will need to get the development headers of exactly their version of python, and specify that you want to only use them etc, and build GNU Radio from source. I do not recommend doing that.

In my opinion, you should probably rather install GNU Radio either from source against the python and libraries on your main OS rather than canopy's happy little installation folder, or use the gnuradio package that Ubuntu has.

I recommend using pybombs to install GNU Radio from source. You'll get the latest and greatest, in a safe install prefix, and easy access to bleeding edge SDR device drivers.

Upvotes: 2

Related Questions