几个小时以来,我一直在尝试让distribute_setup.py在活动的虚拟环境中正确安装。我让它运行,但我总是得到一个错误。任何帮助都将不胜感激。我目前正在尝试在Ubuntu 12.10中做到这一点。
谢谢!
python distribute_setup.py
Extracting in /tmp/tmpvmrkpz
Traceback (most recent call last):
File "distribute_setup.py", line 546, in <module>
sys.exit(main())
File "distribute_setup.py", line 543, in main
return _install(tarball, _build_install_args(options))
File "distribute_setup.py", line 76, in _install
tar = tarfile.open(tarball)
File "/usr/local/lib/python3.3/tarfile.py", line 1571, in open
raise ReadError("file could not be opened successfully")
tarfile.ReadError: file could not be opened successfully
(DjangoTutorial) test@ubuntu:~$ (DjangoTutorial)是活动的虚拟环境
下面是我在尝试构建依赖项时得到的结果
test@ubuntu:~/Code/Tutorial$ sudo apt-get build-dep python3
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: You must put some 'source' URIs in your sources.list
test@ubuntu:~/Code/Tutorial$ Python3.3安装在/usr/local/lib中
我也试过重新安装ubuntu和python3.3,但还是不能工作!
发布于 2013-04-19 21:27:41
这看起来不像是虚拟环境的问题。更确切地说,是python安装缺少依赖项的问题。试一试
sudo apt-get build-dep python3然后再次尝试配置和构建python3.3。还要添加-dev包
sudo apt-get install python3.3-dev现在尝试安装您的软件包。您很可能希望再次创建虚拟环境。
tarfile.py尝试使用四种解压方法(tar、gzip、bz2、xopen)之一打开tarball,如果在python库中找不到相应的模块(其中一些模块可能没有包含在基本python包中),它就会出错。
发布于 2013-04-23 00:40:21
distribute_setup.py将尝试(从网络)下载该软件包,然后进行安装。也许您的下载由于某种原因无法完成,这就是下一步(提取tarball)失败的原因。
您可以尝试从here下载源代码,然后手动安装。
解压目录的$ tar -xzvf distribute-0.6.36.tar.gz
$ cd distribute-0.6.36
$ python setup.py install
https://stackoverflow.com/questions/16095922
复制相似问题