Django running locally on Windows Server (import error, Anaconda prompt)

  anaconda, django, facebook-prophet, windows, windows-server

I have some django web app that I just was running locally on a Windows Laptop. We need to run some tests (emphasis on the test part) and we would like to run it locally (the same way as I do on my windows laptop) on a windows server. Is it possible? Because so far I just have been encountering errors. This web app is running with anaconda and when I try to execute:
python manage.py runserver
I get errors that I do not get locally on my laptop, but the server has the same requirements installed (we are using python 3.8.8) and I get the following error when trying to run "locally" on the server:

from . import views
from . algorithms.config.parametros import * 
forecast_filename = f'{FILENAME_OUTPUT_BASE}.xlsx'
NameError: Name 'FILENAME_OUTPUT_BASE' is not defined

Ok, so a little bit of context, the second line I’m executing inside an except (that means that it failed to just execute from .parametros import * which is weird because I don’t have that issue locally and apparently it can’t import anything in that way).
Also, I’m using Anaconda (prompt) to run this project because we are using FBProphet and one of the requirements is PyStan and I wasn’t able to find the package "m2w64-toolchain" (I think it’s a compiler) outside Anaconda (so if anyone has some idea of how to install that compiler on windows/windows server so I can install FBProphet through pip instead of conda, will be appreciated), but anyway, it’ll be better if I can just solve the first issue (running the web app locally on a windows server using conda).

I wanted to add that I’m really noob on this server part, so I have no idea of anything but I will really appreciate the help!

Thanks!!!

Source: Windows Questions

LEAVE A COMMENT