小编Ben*_*min的帖子

python 2.7 => 导入错误:没有名为 _io 的模块

我决定从 Windows 切换到 Linux,所以我安装了 Ubuntu Raring 最终测试版。

不幸的是,我有一个 Python 问题。

我试图pip从我创建的 virtualenv 中使用,从这样的requirements.txt文件安装包:pip install -r requirements.txt

安装软件包时出现以下错误:

buildutils/initlibzmq.c:10:20: fatal error: Python.h: No such file or directory

compilation terminated.

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)

我在互联网上发现要摆脱这个,我应该安装python-devdeb 包:

sudo apt-get install python-dev
Run Code Online (Sandbox Code Playgroud)

因为我安装了这个包,所以当我尝试运行 python 时出现以下错误:

file: "ImportError: No module named _io".

I use this python from the virtualenv: 
Python 2.7.4rc1 (default, Mar 30 2013, 15:39:28) 
[GCC 4.7.2] on linux2
Run Code Online (Sandbox Code Playgroud)

有没有人有想法?我在谷歌上找不到任何东西,我真的需要解决这个问题才能在我的工作中使用 Ubuntu...

谢谢你的帮助。

编辑: …

python-2.7 13.04

8
推荐指数
2
解决办法
2万
查看次数

标签 统计

13.04 ×1

python-2.7 ×1