无法安装安装anaconda的模块 [英] Cannot install modules with anaconda installed

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

问题描述

我稍后安装了 anaconda 。后来我安装了 django Django 是第一个可以安装成功并且没有错误运行的程序。

I installed anaconda a little while ago. Later I installed django. Django was the first program I could install successfully and run without error.

我刚刚尝试安装 mysqldb 包含以下内容:

I just tried to install mysqldb with the following:

sudo apt-get install python-mysqldb

,并提供以下消息:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-mysqldb is already the newest version.
The following packages were automatically installed and are no longer required:
linux-headers-3.5.0-17 linux-headers-3.5.0-17-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

如果我运行 django 应用程序配置为有一个 mysql 后端我得到

If I run a django app configure to have a mysql back-end I get

ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

我认为这与安装anaconda有关。我正在运行 ubuntu 操作系统。

I think this has something to do with having anaconda installed. I'm running on ubuntu OS.

有谁知道如何获得 mysqldb 模块,以获得 django 的认可?

Does anyone know how I can get mysqldb module to get recognized by django?

看起来像我所有的蟒蛇模块位于:

/home/aiden/anaconda/lib/python2.7

我认为我的django住在:

/ home / aiden / django /

/home/aiden/django/

我搜索mysqldb并在anaconda下找到一个文件:

/home/aiden/anaconda/lib/python2.7/site-packages/sqlalchemy/something.../drizzle/mysqldb.py

我不知道如何检查我在哪里安装东西,但我认为 mysqldb 没有安装b / c它已经在 anaconda

I don't know how to check where I installed things to, but I think that mysqldb isn't getting installed b/c it's already somewhere in anaconda

推荐答案

apt-get 将把东西安装到系统Python中。要将东西安装到Anaconda中,您需要使用 conda 包管理器,假设该包是已经为conda构建的,还是从源构建。您也可以尝试在binstar.org上找到包,如果没有一个在conda已经。

apt-get is going to install things into the system Python. To install things into Anaconda, you need to use the conda package manager, assuming the package is build for conda already, or else build from source. You can also try to find the package on binstar.org if there isn't one in conda already.

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

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