小编Nic*_*sis的帖子

如何在virtualenv中安装python3-gi?

我正在关注Python GTK + 3教程,我正在尝试在virtualenv中运行正在运行的安装.我已经通过Ubuntu包管理器安装了python3-gi.事情看起来像这样:

:~$ mkvirtualenv py3 --python=/usr/bin/python3
Running virtualenv with interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in py3/bin/python3
Also creating executable in py3/bin/python
Installing setuptools, pip...python
done.
(py3):~$ python
Python 3.4.0 (default, Apr 11 2014, 13:05:11) 
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'gi'
>>> 
(py3):~$ deactivate
:~$ …
Run Code Online (Sandbox Code Playgroud)

python virtualenv python-3.x

19
推荐指数
4
解决办法
1万
查看次数

unirest是否支持python3?

unirest是否支持python3?我用谷歌搜索,零信息出现。即使在unirest文档中也没有说仅是2.x,这使我相信它同时支持3.x和2.x。但是,安装将以3.4失败,并以2.7成功。见下文。

nkltss:~/dev$ mkvirtualenv mashape -p /usr/bin/python3
Running virtualenv with interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in mashape/bin/python3
Also creating executable in mashape/bin/python
Installing setuptools, pip...done.


(mashape)nkltss:~/dev$ pip install unirest
Downloading/unpacking unirest
  Downloading Unirest-1.1.6.tar.gz
  Running setup.py (path:/home/nick/.virtualenvs/mashape/build/unirest/setup.py) egg_info for package unirest

    warning: no files found matching '*.txt' under directory 'docs'
Downloading/unpacking poster>=0.8.1 (from unirest)
  Downloading poster-0.8.1.tar.gz
  Running setup.py (path:/home/nick/.virtualenvs/mashape/build/poster/setup.py) egg_info for package poster
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/home/nick/.virtualenvs/mashape/build/poster/setup.py", …
Run Code Online (Sandbox Code Playgroud)

python-3.x unirest

1
推荐指数
1
解决办法
6419
查看次数

标签 统计

python-3.x ×2

python ×1

unirest ×1

virtualenv ×1