我从哪里得到这个错误!我假设我的numpy已经过时但是pip不会让我帮忙。有什么建议?这是我的追溯:
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 1.7.3
Python Version: 2.7.5
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'debug_toolbar',
'hydro',
'djcelery')
Installed Middleware:
('debug_toolbar.middleware.DebugToolbarMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')
Traceback:
File "C:\Python27\ArcGIS10.2\lib\site-packages\django\core\handlers\base.py" in get_response
98. resolver_match = resolver.resolve(request.path_info)
File "C:\Python27\ArcGIS10.2\lib\site-packages\django\core\urlresolvers.py" in resolve
343. for pattern in self.url_patterns:
File "C:\Python27\ArcGIS10.2\lib\site-packages\django\core\urlresolvers.py" in url_patterns
372. patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "C:\Python27\ArcGIS10.2\lib\site-packages\django\core\urlresolvers.py" in urlconf_module
366. self._urlconf_module = import_module(self.urlconf_name)
File "C:\Python27\ArcGIS10.2\lib\importlib\__init__.py" in import_module
37. __import__(name)
File "C:\Users\kacalica\Desktop\Projects\hydroinformatics\Hydroinformatics\urls.py" in <module>
6. from hydro import urls
File "C:\Users\kacalica\Desktop\Projects\hydroinformatics\hydro\urls.py" in <module>
6. from hydro import views
File "C:\Users\kacalica\Desktop\Projects\hydroinformatics\hydro\views.py" in <module>
2. from matplotlib import pylab
File "C:\Python27\ArcGIS10.2\lib\site-packages\matplotlib\__init__.py" in <module>
180. from matplotlib.cbook import is_string_like
File "C:\Python27\ArcGIS10.2\lib\site-packages\matplotlib\cbook.py" in <module>
33. import numpy as np
File "C:\Python27\ArcGIS10.2\lib\site-packages\numpy\__init__.py" in <module>
137. import add_newdocs
File "C:\Python27\ArcGIS10.2\lib\site-packages\numpy\add_newdocs.py" in <module>
13. from numpy.lib import add_newdoc
File "C:\Python27\ArcGIS10.2\lib\site-packages\numpy\lib\__init__.py" in <module>
4. from type_check import *
File "C:\Python27\ArcGIS10.2\lib\site-packages\numpy\lib\type_check.py" in <module>
8. import numpy.core.numeric as _nx
File "C:\Python27\ArcGIS10.2\lib\site-packages\numpy\core\__init__.py" in <module>
10. import numeric
File "C:\Python27\ArcGIS10.2\lib\site-packages\numpy\core\numeric.py" in <module>
1356. from arrayprint import array2string, get_printoptions, set_printoptions
File "C:\Python27\ArcGIS10.2\lib\site-packages\numpy\core\arrayprint.py" in <module>
20. from . import numerictypes as _nt
Exception Type: ImportError at /
Exception Value: cannot import name numerictypes
我认为它需要更新,因为它指向numpy的核心。显然我没有写那个。
答案 0 :(得分:0)
我不得不重新下载matplotlib(包括numpy)
在我的安装过程中,我有一个使用numpy的僵尸进程,在我更新库之前不得不被杀死。之后它才有效!