简体   繁体   English

如何在Python Canopy中安装第三方软件包?

[英]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. 我目前正在尝试在Ubuntu计算机上将第三方软件包(具体来说是gnuradio)安装到Python的Canopy版本中。 I currently have the entire package stored in my filesystem as a folder with subfolders and python files; 目前,我将整个软件包作为一个包含子文件夹和python文件的文件夹存储在文件系统中; 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? 我该怎么办?

You shouldn't use third party pythons on Ubuntu, unless you very exactly know what you're doing (you don't). 您不应该在Ubuntu上使用第三方python,除非您完全知道自己在做什么(不这样做)。 Ubuntu keeps your python up-to-date and uses the package manager to install pack Ubuntu使您的python更新,并使用包管理器安装包

So, setting up a recent version of python is just 因此,设置最新版本的python仅仅是

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. 因此,如果您仍然希望将GNU Radio集成到您的机盖安装中,则需要获取确切版本的python的开发标头,并指定仅使用它们等,然后从源代码构建GNU Radio。 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. 在我看来,您应该宁愿从源代码针对主要操作系统上的python和库安装GNU Radio,而不要使用Canopy的快乐小安装文件夹,或者使用Ubuntu拥有的gnuradio软件包。

I recommend using pybombs to install GNU Radio from source. 我建议使用pybombs从源代码安装GNU Radio。 You'll get the latest and greatest, in a safe install prefix, and easy access to bleeding edge SDR device drivers. 使用安全的安装前缀,您将获得最新,最好的产品,并且可以轻松访问最新的SDR设备驱动程序。

(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 ) (1)Python打包是不一致的,但是一般来说,从软件包的顶层目录键入python setup.py install就足够了(请参阅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? (2)如何确定要安装到Canopy Python中而不是系统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.) 请参阅https://support.enthought.com/entries/23389761-Installing-packages-into-Canopy-Python-from-the-commandline(tl ;从Canopy Tools菜单中打开Canopy Terminal窗口。)

EDIT: Marcus Müller has clarified below that gnuradio is not a python package, so this general advice is true but irrelevant. 编辑:马库斯·穆勒(MarcusMüller)在下面澄清了gnuradio不是python软件包,因此,此一般建议是正确的,但无关紧要。 See his answer below. 请参阅下面的答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Python:如何安装第三方程序包并使其他团队可以使用 - Python: How to install a third-party package and make it available to rest of team 如何在python3上安装第三方模块 - How to install third-party modules on python3 我如何使用 gettext 翻译第三方 python 模块的字符串 - How I can translate the strings of third-party python modules using gettext Python:如何使用第三方库 - Python: How to use a third-party library 如果我需要编辑第三方包的`setup.py`,我应该如何在我的包中使用第三方包? - How should I use a third-party package in my package if I need to edit the third-party package's `setup.py`? 如何将python项目部署到尚未安装某些第三方库的环境中? - How to deploy a python project to an environment that has not install some third-party libraries? 如何覆盖第三方 django 包的迁移 - How to override the migrations of a third-party django package 如何在IBM Cloud Functions Action定制包中安装定制第三方库? - How can i install custom third party library in IBM Cloud functions action custom package? 我可以向其他人发送我安装的第三方Python软件包吗? - Can I send others the third-party Python packages I installed? 如果我有多个Python版本,如何将第三方库安装到特定的Python版本中? - How can I install third party libraries into the spcified Python version if I have multiple Python versions?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM