practical-recommender-systems / moviegeek

A django website used in the book Practical Recommender Systems to illustrate how recommender algorithms can be implemented.
MIT License
903 stars 362 forks source link

Running migrations does not work #16

Closed gordoneliel closed 5 years ago

gordoneliel commented 5 years ago

Similar to #4 . Here is my stack trace:

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/Users/gordoneliel/Documents/Projects/moviegeek/prs/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/Users/gordoneliel/Documents/Projects/moviegeek/prs/lib/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/gordoneliel/Documents/Projects/moviegeek/prs/lib/python3.7/site-packages/django/core/management/base.py", line 316, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/Users/gordoneliel/Documents/Projects/moviegeek/prs/lib/python3.7/site-packages/django/core/management/base.py", line 350, in execute
    self.check()
  File "/Users/gordoneliel/Documents/Projects/moviegeek/prs/lib/python3.7/site-packages/django/core/management/base.py", line 379, in check
    include_deployment_checks=include_deployment_checks,
  File "/Users/gordoneliel/Documents/Projects/moviegeek/prs/lib/python3.7/site-packages/django/core/management/base.py", line 366, in _run_checks
    return checks.run_checks(**kwargs)
  File "/Users/gordoneliel/Documents/Projects/moviegeek/prs/lib/python3.7/site-packages/django/core/checks/registry.py", line 71, in run_checks
    new_errors = check(app_configs=app_configs)
  File "/Users/gordoneliel/Documents/Projects/moviegeek/prs/lib/python3.7/site-packages/django/core/checks/urls.py", line 40, in check_url_namespaces_unique
    all_namespaces = _load_all_namespaces(resolver)
  File "/Users/gordoneliel/Documents/Projects/moviegeek/prs/lib/python3.7/site-packages/django/core/checks/urls.py", line 57, in _load_all_namespaces
    url_patterns = getattr(resolver, 'url_patterns', [])
  File "/Users/gordoneliel/Documents/Projects/moviegeek/prs/lib/python3.7/site-packages/django/utils/functional.py", line 37, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/Users/gordoneliel/Documents/Projects/moviegeek/prs/lib/python3.7/site-packages/django/urls/resolvers.py", line 533, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/Users/gordoneliel/Documents/Projects/moviegeek/prs/lib/python3.7/site-packages/django/utils/functional.py", line 37, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/Users/gordoneliel/Documents/Projects/moviegeek/prs/lib/python3.7/site-packages/django/urls/resolvers.py", line 526, in urlconf_module
    return import_module(self.urlconf_name)
  File "/Users/gordoneliel/Documents/Projects/moviegeek/prs/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/gordoneliel/Documents/Projects/moviegeek/prs_project/urls.py", line 10, in <module>
    url(r'^analytics/', include('analytics.urls')),
  File "/Users/gordoneliel/Documents/Projects/moviegeek/prs/lib/python3.7/site-packages/django/urls/conf.py", line 34, in include
    urlconf_module = import_module(urlconf_module)
  File "/Users/gordoneliel/Documents/Projects/moviegeek/prs/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/gordoneliel/Documents/Projects/moviegeek/analytics/urls.py", line 2, in <module>
    from analytics import views
  File "/Users/gordoneliel/Documents/Projects/moviegeek/analytics/views.py", line 10, in <module>
    from gensim import models
  File "/Users/gordoneliel/Documents/Projects/moviegeek/prs/lib/python3.7/site-packages/gensim/__init__.py", line 5, in <module>
    from gensim import parsing, corpora, matutils, interfaces, models, similarities, summarization, utils  # noqa:F401
  File "/Users/gordoneliel/Documents/Projects/moviegeek/prs/lib/python3.7/site-packages/gensim/corpora/__init__.py", line 6, in <module>
    from .indexedcorpus import IndexedCorpus  # noqa:F401 must appear before the other classes
  File "/Users/gordoneliel/Documents/Projects/moviegeek/prs/lib/python3.7/site-packages/gensim/corpora/indexedcorpus.py", line 15, in <module>
    from gensim import interfaces, utils
  File "/Users/gordoneliel/Documents/Projects/moviegeek/prs/lib/python3.7/site-packages/gensim/interfaces.py", line 21, in <module>
    from gensim import utils, matutils
  File "/Users/gordoneliel/Documents/Projects/moviegeek/prs/lib/python3.7/site-packages/gensim/matutils.py", line 1076, in <module>
    from gensim._matutils import logsumexp, mean_absolute_difference, dirichlet_expectation
  File "__init__.pxd", line 872, in init gensim._matutils
ValueError: numpy.ufunc has the wrong size, try recompiling. Expected 192, got 216
kimfalk commented 5 years ago

Hi,

I'm sorry I haven't seen this before now. As far as I can see it is a problem between package versions. Have a look at this issue for example:

https://github.com/scipy/scipy/issues/3448

Did you install everything in a virtual environment and run the

pip3 install -r requirements.txt

command?

gordoneliel commented 5 years ago

That worked! Thanks for helping.