页次: 1
因为 Ubuntu 通过 pip 安装都是正常的, 暂时不怀疑 pip 的问题或者源码的问题
通过 AUR 安装的完成, 运行是报错
➤➤ http baidu.com
Traceback (most recent call last):
File "/usr/bin/http", line 9, in <module>
load_entry_point('httpie==0.3.0', 'console_scripts', 'http')()
File "/usr/lib/python3.3/site-packages/pkg_resources.py", line 337, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3.3/site-packages/pkg_resources.py", line 2312, in load_entry_point
return ep.load()
File "/usr/lib/python3.3/site-packages/pkg_resources.py", line 2018, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python3.3/site-packages/httpie/__main__.py", line 6, in <module>
from .core import main
File "/usr/lib/python3.3/site-packages/httpie/core.py", line 23, in <module>
from .client import get_response
File "/usr/lib/python3.3/site-packages/httpie/client.py", line 7, in <module>
from requests.defaults import defaults
ImportError: No module named 'requests.defaults'
pip 通过网址安装完, 运行出错
➤➤ sudo pip install --upgrade https://github.com/jkbr/httpie/tarball/master
Downloading/unpacking https://github.com/jkbr/httpie/tarball/master
Downloading master (501kB): 501kB downloaded
Running setup.py egg_info for package from https://github.com/jkbr/httpie/tarball/master
Requirement already up-to-date: requests>=1.0.3 in /usr/lib/python3.3/site-packages (from httpie==0.4.0-alpha)
Requirement already up-to-date: Pygments>=1.5 in /usr/lib/python3.3/site-packages (from httpie==0.4.0-alpha)
Installing collected packages: httpie
Running setup.py install for httpie
Installing http script to /usr/bin
Installing httpie script to /usr/bin
Successfully installed httpie
Cleaning up...
➤➤ http
Traceback (most recent call last):
File "/usr/bin/http", line 9, in <module>
load_entry_point('httpie==0.4.0-alpha', 'console_scripts', 'http')()
File "/usr/lib/python3.3/site-packages/pkg_resources.py", line 337, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3.3/site-packages/pkg_resources.py", line 2312, in load_entry_point
return ep.load()
File "/usr/lib/python3.3/site-packages/pkg_resources.py", line 2018, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python3.3/site-packages/httpie/__main__.py", line 6, in <module>
from .core import main
File "/usr/lib/python3.3/site-packages/httpie/core.py", line 22, in <module>
from .cli import parser
File "/usr/lib/python3.3/site-packages/httpie/cli.py", line 15, in <module>
from .manage import session_name_validator
File "/usr/lib/python3.3/site-packages/httpie/manage.py", line 22, in <module>
version=__version__
TypeError: __init__() got an unexpected keyword argument 'version'
pip 直接安装 httpie 出错
➤➤ sudo pip install httpie
Downloading/unpacking httpie
Downloading httpie-0.3.1.tar.gz (52kB): 52kB downloaded
Running setup.py egg_info for package httpie
Downloading/unpacking requests>=0.10.1,<1.0 (from httpie)
Downloading requests-0.14.2.tar.gz (361kB): 361kB downloaded
Running setup.py egg_info for package requests
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/tmp/pip-build/requests/setup.py", line 6, in <module>
import requests
File "./requests/__init__.py", line 52, in <module>
from . import utils
File "./requests/utils.py", line 22, in <module>
from .compat import parse_http_list as _parse_list_header
File "./requests/compat.py", line 112, in <module>
from .packages import chardet2 as chardet
ImportError: cannot import name chardet2
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/tmp/pip-build/requests/setup.py", line 6, in <module>
import requests
File "./requests/__init__.py", line 52, in <module>
from . import utils
File "./requests/utils.py", line 22, in <module>
from .compat import parse_http_list as _parse_list_header
File "./requests/compat.py", line 112, in <module>
from .packages import chardet2 as chardet
ImportError: cannot import name chardet2
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build/requests
Storing complete log in /root/.pip/pip.log
感觉好邪门...
离线
试试python2的?
Site: CVHC.CC Twitter: @cuihaoleo Org: LUG@USTC
AD: ~欢迎参与志愿计算~
离线
离线
我能不能先问下 yaourt 搜索结果后边括号的里数字是啥意思啊
➤➤ yaourt -Ss httpie
aur/python-httpie 0.3.0-1 (1)
cURL for humans
aur/python-httpie-git 20120828-1 (0)
cURL for humans
aur/python2-httpie 0.3.0-2 (6)
cURL for humans
aur/python2-httpie-git 20120828-1 (0)
cURL for humans
➤➤ yaourt -S aur/python2-httpie
..... 此处省略
loading packages...
resolving dependencies...
looking for inter-conflicts...
Targets (1): python2-httpie-0.3.0-2
Total Installed Size: 0.33 MiB
Proceed with installation? [Y/n] y
(1/1) checking package integrity [############################################################] 100%
(1/1) loading package files [############################################################] 100%
(1/1) checking for file conflicts [############################################################] 100%
(1/1) checking available disk space [############################################################] 100%
(1/1) installing python2-httpie [############################################################] 100%
Optional dependencies for python2-httpie
python2-oauthlib
➤➤ http
Traceback (most recent call last):
File "/usr/bin/http", line 9, in <module>
load_entry_point('httpie==0.3.0', 'console_scripts', 'http')()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 337, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2311, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2017, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python2.7/site-packages/httpie/__main__.py", line 6, in <module>
from .core import main
File "/usr/lib/python2.7/site-packages/httpie/core.py", line 23, in <module>
from .client import get_response
File "/usr/lib/python2.7/site-packages/httpie/client.py", line 7, in <module>
from requests.defaults import defaults
ImportError: No module named defaults
.... 省略
➤➤ yaourt -U python2-httpie-git-20121229-1-any.pkg.tar.xz
loading packages...
resolving dependencies...
looking for inter-conflicts...
Targets (1): python2-httpie-git-20121229-1
Total Installed Size: 0.34 MiB
Proceed with installation? [Y/n]
(1/1) checking package integrity [############################################################] 100%
(1/1) loading package files [############################################################] 100%
(1/1) checking for file conflicts [############################################################] 100%
(1/1) checking available disk space [############################################################] 100%
(1/1) installing python2-httpie-git [############################################################] 100%
➤➤ http2
usage: http2 [--json] [--form] [--pretty {all,colors,format,none}]
[--style STYLE] [--print WHAT] [--verbose] [--headers] [--body]
[--stream]
[--session SESSION_NAME | --session-read-only SESSION_NAME]
[--auth USER[:PASS]] [--auth-type {basic,digest}]
[--proxy PROTOCOL:HOST] [--follow] [--verify VERIFY]
[--timeout SECONDS] [--check-status] [--help] [--version]
[--traceback] [--debug]
[METHOD] URL [REQUEST ITEM [REQUEST ITEM ...]]
http2: error: too few arguments
一直到 python2 和 git 的版本才成功.. 命令也变成了 http2 ...
离线
我能不能先问下 yaourt 搜索结果后边括号的里数字是啥意思啊
投票数。
离线
jiyinyiyong 说:我能不能先问下 yaourt 搜索结果后边括号的里数字是啥意思啊
投票数。
投票? 怎们投?
离线
离线
觉得不要用aur装,如果系统不依赖的话,用virualenv+pip省心省力
>>>>>>>>>jekyll博客>>>>>>>>>>
<<<<<<<<<更残念的vimwiki<<<<<<<<<
本人vim控,偏偏喜欢lisp
离线
觉得不要用aur装,如果系统不依赖的话,用virualenv+pip省心省力
virualenv 和 pip是什么
离线
reverland 说:觉得不要用aur装,如果系统不依赖的话,用virualenv+pip省心省力
virualenv 和 pip是什么
相当于在电脑上多了个独立空间
离线
页次: 1