小编jos*_*ody的帖子

在ActivePython-2.6中安装pyCurl?

我以前使用pyCurl并使用我的系统默认python安装.但是,我有一个项目需要python更便携,我使用的是ActivePython-2.6.

到目前为止,我没有安装任何其他模块的问题,但是安装pyCurl时遇到错误.错误:

Searching for pycurl
Reading http://pypi.python.org/simple/pycurl/
Reading http://pycurl.sourceforge.net/
Reading http://pycurl.sourceforge.net/download/
Best match: pycurl 7.19.0
Downloading http://pycurl.sourceforge.net/download/pycurl-7.19.0.tar.gz
Processing pycurl-7.19.0.tar.gz
Running pycurl-7.19.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-tfVLW6/pycurl-7.19.0/egg-dist-tmp-p1WjAy
sh: curl-config: not found
Traceback (most recent call last):
  File "/opt/ActivePython-2.6/bin/easy_install", line 8, in <module>
    load_entry_point('setuptools==0.6c9', 'console_scripts', 'easy_install')()
  File "/opt/ActivePython-2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 1671, in main
  File "/opt/ActivePython-2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 1659, in with_ei_usage
  File "/opt/ActivePython-2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 1675, in <lambda>
  File "/opt/ActivePython-2.6/lib/python2.6/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/opt/ActivePython-2.6/lib/python2.6/distutils/dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "/opt/ActivePython-2.6/lib/python2.6/distutils/dist.py", line 995, in …
Run Code Online (Sandbox Code Playgroud)

python libcurl pycurl activepython

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

ViewDoesNotExist:尝试登录模块django.contrib.auth.views.错误是:'module'对象没有属性'__file__'

我使用Apache和mod_wsgi部署了我的django应用程序.所有设置加载正常,但当我将用户重定向到登录页面时,我收到以下错误:

  File "/opt/ActivePython-2.6/lib/python2.6/site-packages/django/core/handlers/base.py", line 83, in get_response
    request.path_info)

  File "/opt/ActivePython-2.6/lib/python2.6/site-packages/django/core/urlresolvers.py", line 186, in resolve
    sub_match = pattern.resolve(new_path)

  File "/opt/ActivePython-2.6/lib/python2.6/site-packages/django/core/urlresolvers.py", line 125, in resolve
    return self.callback, args, kwargs

  File "/opt/ActivePython-2.6/lib/python2.6/site-packages/django/core/urlresolvers.py", line 137, in _get_callback
    raise ViewDoesNotExist, "Tried %s in module %s. Error was: %s" % (func_name, mod_name, str(e))

ViewDoesNotExist: Tried login in module django.contrib.auth.views. Error was: 'module' object has no attribute '__file__'
Run Code Online (Sandbox Code Playgroud)

使用或不使用登录重定向,我在尝试加载/ admin站点时收到此错误.

  File "/opt/ActivePython-2.6/lib/python2.6/site-packages/django/core/handlers/base.py", line 92, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/opt/ActivePython-2.6/lib/python2.6/site-packages/django/contrib/admin/sites.py", line 164, in wrapper …
Run Code Online (Sandbox Code Playgroud)

django

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

标签 统计

activepython ×1

django ×1

libcurl ×1

pycurl ×1

python ×1