Issue running fbprophet
Closed this issue · 1 comments
bryceq commented
I have been following the steps setting up this project but I have run into an issue I don't know how to resolve. I have set up virtualenv and all of the requirements but when I try to run the server I run into an issue related to fbprophet and pystan. Im using Windows 10 with installation from Anaconda. Any help that you can give me would be greatly appreciated!
python crypto_signal/manage.py runserver
Performing system checks...
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x00000287F1310730>
Traceback (most recent call last):
File "C:\Users\bpman\AppData\Local\Programs\Python\Python37\lib\site-packages\fbprophet\forecaster.py", line 21, in <module>
import pystan # noqa F401
File "C:\Users\bpman\AppData\Local\Programs\Python\Python37\lib\site-packages\pystan\__init__.py", line 9, in <module>
from pystan.api import stanc, stan
File "C:\Users\bpman\AppData\Local\Programs\Python\Python37\lib\site-packages\pystan\api.py", line 14, in <module>
import pystan._api # stanc wrapper
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\bpman\AppData\Local\Programs\Python\Python37\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "C:\Users\bpman\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\commands\runserver.py", line 117, in inner_run
self.check(display_num_errors=True)
File "C:\Users\bpman\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py", line 379, in check
include_deployment_checks=include_deployment_checks,
File "C:\Users\bpman\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py", line 366, in _run_checks
return checks.run_checks(**kwargs)
File "C:\Users\bpman\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\checks\registry.py", line 71, in run_checks
new_errors = check(app_configs=app_configs)
File "C:\Users\bpman\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\checks\urls.py", line 40, in check_url_namespaces_unique
all_namespaces = _load_all_namespaces(resolver)
File "C:\Users\bpman\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\checks\urls.py", line 57, in _load_all_namespaces
url_patterns = getattr(resolver, 'url_patterns', [])
File "C:\Users\bpman\AppData\Local\Programs\Python\Python37\lib\site-packages\django\utils\functional.py", line 37, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "C:\Users\bpman\AppData\Local\Programs\Python\Python37\lib\site-packages\django\urls\resolvers.py", line 533, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "C:\Users\bpman\AppData\Local\Programs\Python\Python37\lib\site-packages\django\utils\functional.py", line 37, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "C:\Users\bpman\AppData\Local\Programs\Python\Python37\lib\site-packages\django\urls\resolvers.py", line 526, in urlconf_module
return import_module(self.urlconf_name)
File "C:\Users\bpman\AppData\Local\Programs\Python\Python37\lib\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 "C:\Users\bpman\crypto_signal\crypto_signal\crypto_signal\urls.py", line 18, in <module>
from crypto_track import views
File "C:\Users\bpman\crypto_signal\crypto_signal\crypto_track\views.py", line 6, in <module>
from crypto_track.trends import CryptoTrends
File "C:\Users\bpman\crypto_signal\crypto_signal\crypto_track\trends.py", line 5, in <module>
from crypto_track.stocker import Prophet
File "C:\Users\bpman\crypto_signal\crypto_signal\crypto_track\stocker.py", line 6, in <module>
import fbprophet
File "C:\Users\bpman\AppData\Local\Programs\Python\Python37\lib\site-packages\fbprophet\__init__.py", line 8, in <module>
from fbprophet.forecaster import Prophet
File "C:\Users\bpman\AppData\Local\Programs\Python\Python37\lib\site-packages\fbprophet\forecaster.py", line 23, in <module>
logger.exception('You cannot run fbprophet without pystan installed')
NameError: name 'logger' is not defined
bryceq commented
I was able to fix this by running everything through the Anaconda prompt and using pip to reinstall any non-working dependencies, again through Anaconda.