Python Django迁移

Python Django迁移,python,django,localhost,Python,Django,Localhost,我已将django网站从live server迁移到本地主机,我备份了posrgresql数据库并连接到我的本地主机。我已在live_setting.py中更改了数据库连接详细信息,还安装了所需的软件包,这些软件包已安装在live server上,但我无法在本地主机上运行网站。当我使用manage.py ruserver命令时,我遇到以下错误 Unhandled exception in thread started by <bound method Command.inner_run o

我已将django网站从live server迁移到本地主机,我备份了posrgresql数据库并连接到我的本地主机。我已在live_setting.py中更改了数据库连接详细信息,还安装了所需的软件包,这些软件包已安装在live server上,但我无法在本地主机上运行网站。当我使用manage.py ruserver命令时,我遇到以下错误

Unhandled exception in thread started by <bound method Command.inner_run of <django.contrib.staticfiles.management.commands.runserver.Command object at 0x02BB6530>>
Traceback (most recent call last):
  File "C:\Python26\lib\site-packages\django\core\management\commands\runserver.py", line 91, in inner_run self.validate(display_num_errors=True)
  File "C:\Python26\lib\site-packages\django\core\management\base.py", line 266,in validate num_errors = get_validation_errors(s, app)
  File "C:\Python26\lib\site-packages\django\core\management\validation.py", line 30, in get_validation_errors for (app_name, error) in get_app_errors().items():
  File "C:\Python26\lib\site-packages\django\db\models\loading.py", line 158, inget_app_errors self._populate()
  File "C:\Python26\lib\site-packages\django\db\models\loading.py", line 67, in_populate self.load_app(app_name)
  File "C:\Python26\lib\site-packages\django\db\models\loading.py", line 88, in load_app models = import_module('.models', app_name)
  File "C:\Python26\lib\site-packages\django\utils\importlib.py", line 35, in import_module__import__(name)
  File "C:\Python26\lib\site-packages\django_social_auth3-0.7.20-py2.6.egg\social_auth\models.py", line 8, in <module>'social_auth.db.django_models'))
  File "C:\Python26\lib\site-packages\django\utils\importlib.py", line 35, in import_module__import__(name)
  File "C:\Python26\lib\site-packages\django_social_auth3-0.7.20-py2.6.egg\social_auth\db\django_models.py", line 5, in <module>from social_auth.db.base import UserSocialAuthMixin, AssociationMixin, \
  File "C:\Python26\lib\site-packages\django_social_auth3-0.7.20-py2.6.egg\social_auth\db\base.py", line 7, in <module> from openid.association import Association as OIDAssociation
  File "build\bdist.win32\egg\openid\association.py", line 37, in <module>
  File "build\bdist.win32\egg\openid\cryptutil.py", line 33, in <module>
  File "build\bdist.win32\egg\openid\oidutil.py", line 16, in <module> ImportError: No module named parse
由启动的线程中未处理的异常 回溯(最近一次呼叫最后一次): 文件“C:\Python26\lib\site packages\django\core\management\commands\runserver.py”,第91行,在内部运行self.validate(display\u num\u errors=True) 文件“C:\Python26\lib\site packages\django\core\management\base.py”,第266行,在validate num\u errors=get\u validation\u errors(s,app)中 文件“C:\Python26\lib\site packages\django\core\management\validation.py”,第30行,位于get\u app\u errors()中的get\u validation\u errors(app\u name,error)中。items() 文件“C:\Python26\lib\site packages\django\db\models\loading.py”,第158行,inget\u app\u errors self.\u populate() 文件“C:\Python26\lib\site packages\django\db\models\loading.py”,第67行,在\u populate self.load\u应用程序(应用程序名称)中 文件“C:\Python26\lib\site packages\django\db\models\loading.py”,第88行,在load\u app models=import\u模块('.models',app\u name)中 文件“C:\Python26\lib\site packages\django\utils\importlib.py”,第35行,在导入模块导入(名称)中 文件“C:\Python26\lib\site packages\django\u social\u auth3-0.7.20-py2.6.egg\social\u auth\models.py”,第8行,在“social\u auth.db.django\u models”中) 文件“C:\Python26\lib\site packages\django\utils\importlib.py”,第35行,在导入模块导入(名称)中 文件“C:\Python26\lib\site packages\django\u social\u auth3-0.7.20-py2.6.egg\social\u auth\db\django\u models.py”,第5行,从social\u auth.db.base导入用户socialauthMixin,AssociationMixin\ 文件“C:\Python26\lib\site packages\django\u social\u auth3-0.7.20-py2.6.egg\social\u auth\db\base.py”,第7行,从openid.association导入association作为OIDAAssociation 文件“build\bdist.win32\egg\openid\association.py”,第37行,在 文件“build\bdist.win32\egg\openid\cryptutil.py”,第33行,在 文件“build\bdist.win32\egg\openid\oidutil.py”,第16行,在ImportError中:没有名为parse的模块
我正在使用python 2.6和django 1.4.3,如何解决这些错误,我是python/django开发新手。

您正在python 2上运行python 3代码,请参见示例。,但在网站的需求文件中,我看到了以下细节Django==1.4.3 South==0.7.6 PIL==1.1.7 Django articles==2.4.1 Django联系人表单==0.3.1 Django social auth==0.7.20 httplib2==0.7.7 oauth2==1.5.211 python openid==2.2.5 sorl缩略图==11.12,据我所知,它使用的是django 1.4.3,而这个版本与python 3不兼容?我说的对吗?它可能与您的
distribute
安装(您用来安装东西的工具)有关,请参见另一个问题。我不确定是哪个软件包导致了您的问题,但“没有名为parse的模块”是我以前见过的一个问题,它是由于代码试图从
urllib.parse
导入而发生的,而您的特定Python安装中不存在该问题。我使用setup.py install命令直接进入目录安装不同的站点包,例如,如果我想安装django articles 2.4.1,我只是在使用上面的命令解压后从网站下载它。