Closed jinningwang closed 11 months ago
After looking into this, Windows does not have any support for production level WSGI. Or rather, the WSGI do not have any support for windows. What I can do is add the ability to run AGVis in a developer mode, which should work on windows just fine for personal use. It just won't be suitable for a production level environment. I will get back to you on the correct commands to use.
A good idea can be making compatibility for personal use on Windows. We can still stick with the existing design since we aimed at a production level web app. Is it possible to disable some trouble functions if Windows platform is detected? Most windows users only need to activate the web app and visualize the topology.
After looking into this, Windows does not have any support for production level WSGI. Or rather, the WSGI do not have any support for windows. What I can do is add the ability to run AGVis in a developer mode, which should work on windows just fine for personal use. It just won't be suitable for a production level environment. I will get back to you on the correct commands to use.
A good idea can be making compatibility for personal use on Windows. We can still stick with the existing design since we aimed at a production level web app. Is it possible to disable some trouble functions if Windows platform is detected? Most windows users only need to activate the web app and visualize the topology.
After looking into this, Windows does not have any support for production level WSGI. Or rather, the WSGI do not have any support for windows. What I can do is add the ability to run AGVis in a developer mode, which should work on windows just fine for personal use. It just won't be suitable for a production level environment. I will get back to you on the correct commands to use.
Yes, we can get the OS the user is running with python and create wrappers around certain sections to disable their functionality based on the OS.
Navigating into the agvis directory (the one with app.py) and running flask run -p 8810
works on windows. This command does not use the gunicorn server, but instead the built in flask development server.
I can make the agvis run command grab the OS, and run the production server if it is on linux, or the development server if it is being run from Windows, so the user input will be the same no matter what platform.
I can use following command to host the web app:
cd /Users/jinningwang/Documents/work/agvis/agvis/static
python3 -m http.server 8810
but I cannot find file app.py
in AGVis directory.
Navigating into the agvis directory (the one with app.py) and running
flask run -p 8810
works on windows. This command does not use the gunicorn server, but instead the built in flask development server.
You are almost in the right directory. app.py is in the directory above static.
Using cd /Users/jinningwang/Documents/work/agvis/agvis
should get you there.
My bad, I was using the develop
branch...
Maybe you can sync the master and develop? It is more common for develop get ahead of master rather than instead.
You are almost in the right directory. app.py is in the directory above static.
Using
cd /Users/jinningwang/Documents/work/agvis/agvis
should get you there.
My bad, I was using the
develop
branch... Maybe you can sync the master and develop? It is more common for develop get ahead of master rather than instead.
I do not believe I have permissions to sync the develop branch.
Actually, I believe I should have the permissions, I just am not seeing the button I am used to syncing with on the github site. I can just do it manually.
No worry, I've done it manually this time. Later we can do work on develop first and then merge develop into master. ^-^
Actually, I believe I should have the permissions, I just am not seeing the button I am used to syncing with on the github site. I can just do it manually.
Yes, I can do that haha.
Another error on my end, "An unexpected error has occured while trying to start AGVis: [Errno 2] No such file or directory: 'gunicorn'"
Is this on Windows or Linux?
Is this on Windows or Linux?
Darwin, so I guess it's a unix-like one. I'm using MacOS with conda.
I was told by Nicholas that we did not support MacOS. Did AGVis work on MacOS in the past?
Can you try running the flask command flask run -p 8810
? This will tell me if it is an issue with gunicorn specifically.
You should be able to run the AGVis environment through docker as well without problems in the mean time. It loads a Debian distribution in the container so there are no OS conflicts. I have included instructions if you need. Since I am not used to MacOS commands, the actual commands might differ.
From the agvis directory:
./go.sh build
tmux
./go.sh dev2
http://localhost:8810/
in your browsertmux detach
./go.sh clean
Here is the youtube tutorial if you need Tutorial
It could also be that the required packages haven't been installed. Gunicorn requires a new package. I included this in the requirements.txt folder, so running python3 -m pip install -e .
or pip install -r requirements.txt
might do the trick.
Zack, thanks. After reinstalling the dependencies, it works well now.
Awesome! I am happy to know it works correctly on MacOS too.
I am going to close this issue since it has been solved.
As Zack suggested, a quick solution can be using the
flask
to avoid it. Remember to use the branchmaster
When using AGVis on windows, an error occurred that "no module named 'fcntl'", as shown in the below screenshot. It seems that fcntl does not support windows platform. Can we do a quick fix on this?