-
Notifications
You must be signed in to change notification settings - Fork 47
Running on Windows OS with Python 3
Nikhil VJ edited this page Aug 5, 2019
·
3 revisions
- Install MiniConda as per your OS and 32/64 bit: https://conda.io/miniconda.html . Choose the default options.. nothing special needed.
- Open Start Menu > Anaconda.. > Anaconda Prompt
- A command prompt (black dos box) will open. This is like the regular windows command prompt, but has the added functionality of having python commands working.
- You'll be at some C:\XYZ path. Navigate to the folder where you have cloned/unzipped this repo. (oh, in case you haven't already.. you do need to download this program's repo :P See the "Clone.." button around the top of the page)
- Try running this command:
python GTFSManager.py
. You'll probably get an error saying a particular module is not found. We have to download and install some dependencies first. No worries, they're nicely listed in therequirements.txt
file in the same folder. - We now create a virtual environment (no it won't be another folder, stay where you are.. just run the commands huh?) and install the required python modules:
- Run these commands. You might be shown some prompts and asked to confirm. Just go with the flow.
conda create -n gtfs python=3.6
activate gtfs
pip install -r requirements.txt
- Note that all of this happens while your command prompt is STILL in the downloaded program's folder. For explanation see notes after the steps. The first and the last commands will take time to complete.
pip install..
will need an active internet connection, note. Take a 10-min break while it all happens. - Once you are done, run
python GTFSManager.py
. You should see lines like:
static GTFS Manager
Fork it on Github: https://github.com/WRI-Cities/static-GTFS-manager/
Starting up the program, please wait...
Loaded dependences, starting static GTFS Manager program.
Open http://localhost:5000 in your Browser if you don't see it opening automatically within 5 seconds.
- A web browser tab will open. If it's Internet Explorer, please copy-paste the URL and run it in Chrome or something else instead. There are some compatibility issues with IE on the JS side.
- You might get a prompt from Windows Firewall. You can click Cancel or OK, it won't make any difference at your end. But if you want this program to be accessed by other machines on your LAN or WiFi network, then choose the appropriate options and proceed.
- A new tab should open in your web browser automatically, but in case it doesn't, please browse to the URL given in the command prompt output.
- The program now runs like a website in your browser. Note that this program is best seen from Chrome browser.
- To exit, you can simply close your browser tabs and close the command prompt box. Pressing Ctrl+C doesn't work immediately.. you need to perform some action in the browser like navigating to a different page.
Virtual Environment: Python provides a way to create a virtual environment where the packages you download will not interfere with the main python installation. This becomes useful when you want to run a program having fixed dependencies and in later years the new versions change things that may break your program.
pip install : pip
and even conda
which you can use if pip doesn't work at your end, are standard package managers in python. They download these packages/modules from official sources.
Python 3.6 and not 3.7: As of Oct 2018, because one of the modules/packages doesn't work on 3.7 yet. See https://github.com/WRI-Cities/static-GTFS-manager/issues/124