开发者社区> 问答> 正文

apache+python访问报错?报错

在linux部署的apache+python, 用manage.py启动就正常,但用apache启动就报错,搞了两天了还是弄不好,求助啊

Environment:




Request Method: GET
Request URL: http://192.168.3.155:8088/


Django Version: 1.6.5
Python Version: 2.7.6
Installed Applications:
('django.contrib.staticfiles', 'users')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware')




Traceback:
File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  99.                 resolver_match = resolver.resolve(request.path_info)
File "/usr/local/lib/python2.7/site-packages/django/core/urlresolvers.py" in resolve
  337.             for pattern in self.url_patterns:
File "/usr/local/lib/python2.7/site-packages/django/core/urlresolvers.py" in url_patterns
  365.         patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/local/lib/python2.7/site-packages/django/core/urlresolvers.py" in urlconf_module
  360.             self._urlconf_module = import_module(self.urlconf_name)
File "/usr/local/lib/python2.7/site-packages/django/utils/importlib.py" in import_module
  40.         __import__(name)
File "/fosTest/fos/fos/urls.py" in <module>
  8.     (r'^fos/task/', include('tasks.urls')),
File "/usr/local/lib/python2.7/site-packages/django/conf/urls/__init__.py" in include
  26.         urlconf_module = import_module(urlconf_module)
File "/usr/local/lib/python2.7/site-packages/django/utils/importlib.py" in import_module
  40.         __import__(name)
File "/fosTest/fos/tasks/urls.py" in <module>
  2. from tasks.views import create,delete,update,queryList,queryOne,queryTimeLineList,queryTimelineOne,createTimeline,robTask
File "/fosTest/fos/tasks/views.py" in <module>
  7. from editsupport.views import lock_task,release_task
File "/fosTest/fos/editsupport/views.py" in <module>
  28. from shapely.geometry import mapping
File "/usr/local/lib/python2.7/site-packages/Shapely-1.3.3-py2.7-linux-x86_64.egg/shapely/geometry/__init__.py" in <module>
  4. from .base import CAP_STYLE, JOIN_STYLE
File "/usr/local/lib/python2.7/site-packages/Shapely-1.3.3-py2.7-linux-x86_64.egg/shapely/geometry/base.py" in <module>
  9. from shapely.coords import CoordinateSequence
File "/usr/local/lib/python2.7/site-packages/Shapely-1.3.3-py2.7-linux-x86_64.egg/shapely/coords.py" in <module>
  8. from shapely.geos import lgeos
File "/usr/local/lib/python2.7/site-packages/Shapely-1.3.3-py2.7-linux-x86_64.egg/shapely/geos.py" in <module>
  57.     _lgeos = load_dll('geos_c', fallbacks=['libgeos_c.so.1', 'libgeos_c.so'])
File "/usr/local/lib/python2.7/site-packages/Shapely-1.3.3-py2.7-linux-x86_64.egg/shapely/geos.py" in load_dll
  53.             libname, fallbacks or []))


Exception Type: OSError at /
Exception Value: Could not find library geos_c or load any of its variants ['libgeos_c.so.1', 'libgeos_c.so']
 

展开
收起
爱吃鱼的程序员 2020-06-14 21:26:06 765 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    http://stackoverflow.com/questions/19742406/could-not-find-library-geos-c-or-load-any-of-its-variants试了,还是不好使uwsgi+nginx方便多了

    gunicorn部署比较方便快捷。可以试试哦。

    ////

    gunicorn--worker-class=geventupdate.wsgi:application-b0.0.0.0:8000

    2020-06-14 21:26:22
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Apache Flink技术进阶 立即下载
Apache Spark: Cloud and On-Prem 立即下载
Hybrid Cloud and Apache Spark 立即下载