ubuntu14安装python,scrapy。项目运行报错,求大神指点。感谢。
Traceback (most recent call last):
File "/usr/local/bin/scrapy", line 11, in <module>
sys.exit(execute())
File "/usr/local/lib/python2.7/dist-packages/scrapy/cmdline.py", line 143, in execute
_run_print_help(parser, _run_command, cmd, args, opts)
File "/usr/local/lib/python2.7/dist-packages/scrapy/cmdline.py", line 89, in _run_print_help
func(*a, **kw)
File "/usr/local/lib/python2.7/dist-packages/scrapy/cmdline.py", line 150, in _run_command
cmd.run(args, opts)
File "/usr/local/lib/python2.7/dist-packages/scrapy/commands/crawl.py", line 57, in run
self.crawler_process.crawl(spname, **opts.spargs)
File "/usr/local/lib/python2.7/dist-packages/scrapy/crawler.py", line 150, in crawl
crawler = self._create_crawler(crawler_or_spidercls)
File "/usr/local/lib/python2.7/dist-packages/scrapy/crawler.py", line 166, in _create_crawler
return Crawler(spidercls, self.settings)
File "/usr/local/lib/python2.7/dist-packages/scrapy/crawler.py", line 46, in __init__
self.extensions = ExtensionManager.from_crawler(self)
File "/usr/local/lib/python2.7/dist-packages/scrapy/middleware.py", line 56, in from_crawler
return cls.from_settings(crawler.settings, crawler)
File "/usr/local/lib/python2.7/dist-packages/scrapy/middleware.py", line 32, in from_settings
mwcls = load_object(clspath)
File "/usr/local/lib/python2.7/dist-packages/scrapy/utils/misc.py", line 44, in load_object
mod = import_module(module)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/local/lib/python2.7/dist-packages/scrapy/extensions/memusage.py", line 16, in <module>
from scrapy.mail import MailSender
File "/usr/local/lib/python2.7/dist-packages/scrapy/mail.py", line 22, in <module>
from twisted.internet import defer, reactor, ssl
File "/usr/local/lib/python2.7/dist-packages/Twisted-15.4.0-py2.7-linux-x86_64.egg/twisted/internet/ssl.py", line 59, in <module>
from OpenSSL import SSL
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/rand.py", line 11, in <module>
from OpenSSL._util import (
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/_util.py", line 6, in <module>
from cryptography.hazmat.bindings.openssl.binding import Binding
File "/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 13, in <module>
from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError: /usr/local/lib/python2.7/dist-packages/cryptography/hazmat/bindings/_openssl.so: undefined symbol: X509_VERIFY_PARAM_set1_ip_asc
求大神,解答。折腾好几天了。就是实在搞不定了。缺包,Linux下装下openssl呗最后一句是重点:借用别人的blog。应该你会明白的。<spanstyle="color:#333333;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:14px;line-height:25px;background-color:#FFFFFF;">原因是<spanstyle="color:#333333;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:14px;line-height:25px;background-color:#FF0000;">craptography<spanstyle="color:#333333;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:14px;line-height:25px;background-color:#FFFFFF;">并没有安装http://my.oschina.net/u/2003106/blog/485890undefinedsymbol:X509_VERIFY_PARAM_set1_ip_asc是变量未定义。但是_openssl.so文件是存在的啊。是什么系统库依赖不对吧?实在找不出问题了。cryptography(1.1.1)这个确实安装过了。
<spanstyle="font-family:'MicrosoftYaHei',Verdana,sans-serif,宋体;font-size:14px;line-height:22px;background-color:#FFFFFF;"><spanstyle="font-family:'MicrosoftYaHei',Verdana,sans-serif,宋体;font-size:14px;line-height:22px;background-color:#FFFFFF;">cryptography是不是安装的有问题?
<spanstyle="font-family:'MicrosoftYaHei',Verdana,sans-serif,宋体;font-size:14px;line-height:22px;background-color:#FFFFFF;">
<spanstyle="color:#007777;font-family:Verdana,Arial,Helvetica;font-size:small;line-height:normal;background-color:#FFFFFF;">importOpenSSL
<spanstyle="line-height:normal;background-color:#FFFFFF;">openssl版本问题:
<spanstyle="color:#007777;font-family:Verdana,Arial,Helvetica;font-size:small;line-height:normal;background-color:#FFFFFF;"><atarget="_blank"rel="nofollow">http://pypi.python.org/pypi/pyOpenSSL<spanstyle="font-family:Verdana,Arial,Helvetica;font-size:small;line-height:normal;background-color:#FFFFFF;">
<spanstyle="color:#007777;font-family:Verdana,Arial,Helvetica;font-size:small;line-height:normal;background-color:#FFFFFF;">
<imgsrc="http://static.oschina.net/uploads/space/2015/1126/162836_rAPQ_2486541.jpg"alt="">
我的目录结构你看下,有没有问题
<imgsrc="http://static.oschina.net/uploads/space/2015/1126/163006_E7zY_2486541.jpg"alt="">
我有两个名字差不多的
我的环境是ubuntu14.阿里云服务器。<divclass='ref'><imgsrc="http://static.oschina.net/uploads/space/2015/1126/163006_E7zY_2486541.jpg"alt="">
我有两个名字差不多的
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。