相关疑难解决方法(0)

如何获得urllib3和请求使用jython 2.7 beta 1?

聪明人,

我想在我的jython程序中使用awesome requests模块.它在python中安装和运行得很好,但我无法在jython中安装它.我在mac和ubuntu上尝试了Jython 2.7a2和2.7b1,并获得了与urllib3相关的相同错误.

首先安装了如何使用jython setup.py install中提到的ez_setup.py

然后从jython bin目录中运行easy_install会导致异常:

NameError: name 'CERT_NONE' is not defined
gautam-mbp:bin gautam$ ./easy_install requests
Searching for requests
Reading http://pypi.python.org/simple/requests/
Reading http://python-requests.org
Reading https://github.com/kennethreitz/requests
Best match: requests 1.1.0
Downloading http://pypi.python.org/packages/source/r/requests/requests-1.1.0.tar.gz#md5=a0158815af244c32041a3147ee09abf3
Processing requests-1.1.0.tar.gz
Running requests-1.1.0/setup.py -q bdist_egg --dist-dir /var/folders/jf/cb2pc45s7d94hd6sndysvyxw0000gn/T/easy_install-MnOao_/requests-1.1.0/egg-dist-tmp-E2Rkg1
Traceback (most recent call last):
  File "./easy_install", line 7, in <module>
    sys.exit(
  File "/Users/gautam/jython27b1/Lib/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1712, in main
  File "/Users/gautam/jython27b1/Lib/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1700, in with_ei_usage
  File "/Users/gautam/jython27b1/Lib/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1712, in <lambda>
-----------lots of stack trace---------------
  File …
Run Code Online (Sandbox Code Playgroud)

jython urllib3

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

标签 统计

jython ×1

urllib3 ×1