使用Anaconda或Canopy安装Python模块 [英] Installing Python modules with Anaconda or Canopy

查看:380
本文介绍了使用Anaconda或Canopy安装Python模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Python上玩了一点,但从来没有安装自己的软件包.我目前正在尝试编写一个读取"tiff"文件的程序,因此我正在尝试安装"libtiff"软件包,而我却陷入了噩梦!

I have played around with Python a little but never have I had to install my own packages. I am currently trying to write a program that reads in 'tiff' files so I'm trying to install the 'libtiff' package and I'm having a nightmare!

首先,我使用的是Anaconda发行版和短语"conda install libtiff",它告诉我安装成功.但是后来我再也无法在Spyder IDE或ipython控制台中找到libtiff.

First, I was using the Anaconda distribution and the phrase 'conda install libtiff' which would tell me the install was successful. However then I was never able to find libtiff in the Spyder IDE or ipython console.

过去曾使用Canopy,所以我卸载了Anaconda,并使用'pip install libtiff'给Canopy了另一个镜头,但是我收到一条错误消息,错误代码为1,并且我不知道这是什么.

Having used Canopy in the past, I uninstalled Anaconda and gave Canopy another shot using 'pip install libtiff', however I receive an error saying it failed with error code 1 and I don't know what this is.

我肯定错过了一些非常关键的东西,但是事实证明,安装此模块几乎是不可能的!

I must be missing something fairly crucial but installing this module is proving almost impossible!

推荐答案

在spyder的 IPython 控制台上使用!可使您使用pip.因此,在示例中,您可以执行以下操作:

Using ! on the IPython console within spyder allows you to use pip. So, in the example, you could do:

In [1]: !pip install libtiff

请注意,对于〜2.3.3.之前的Spyder版本,这在Python控制台上也可用(尽管可能不可靠).

Note, this is also available (though perhaps unreliably) on the Python console for Spyder versions before ~2.3.3.

这篇关于使用Anaconda或Canopy安装Python模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆