Abhijeet-AR / Competitive_Programming_Score_API

API to get user details for competitive coding platforms - Codeforces, Codechef, SPOJ, Interviewbit
MIT License
184 stars 59 forks source link

Installation instructions in windows #20

Closed sdssgroup closed 3 years ago

sdssgroup commented 3 years ago

Hello bro, bro can you please share installation instructions or procedure to get scores by using your repo I had installed all the packages in requirements.txt and stuck how to install it. can you please solve the issue by sharing installation methods. Thank you

Abhijeet-AR commented 3 years ago

Sure, I'll add installation instructions to readme soon(feel free to do a PR if you successfully setup the repo in Windows). For now you can follow this.

  1. Download chrome driver from here based on your Chrome version and OS.
  2. Replace the existing driver with downloaded driver.
  3. Install dependencies
    • pip install -r requirements.txt.
  4. Set FLASK_APP environment variable
    • $env:FLASK_APP = "main"
  5. Run application
    • flask run or python -m flask run
sdssgroup commented 3 years ago

Hii Abhijeet-AR bro, I am getting following error when I run python -m flask run in command prompt:

Error: Could not locate a Flask application. You did not provide the "FLASK_APP" environment variable, and a "wsgi.py" or "app.py" module was not found in the current directory.

when I run python -m flask run --help this I got: Usage: python -m flask run [OPTIONS]

Run a local development server.

This server is for development purposes only. It does not provide the stability, security, or performance of production WSGI servers.

The reloader and debugger are enabled by default if FLASK_ENV=development or FLASK_DEBUG=1.

Options: -h, --host TEXT The interface to bind to. -p, --port INTEGER The port to bind to. --cert PATH Specify a certificate file to use HTTPS. --key FILE The key file to use when specifying a certificate. --reload / --no-reload Enable or disable the reloader. By default the reloader is active if debug is enabled. --debugger / --no-debugger Enable or disable the debugger. By default the debugger is active if debug is enabled. --eager-loading / --lazy-loading Enable or disable eager loading. By default eager loading is enabled if the reloader is disabled. --with-threads / --without-threads Enable or disable multithreading. --extra-files PATH Extra files that trigger a reload on change. Multiple paths are separated by ';'. --help Show this message and exit.

If you don't mind can you please keep a video tutorial and provide link in readme.md BTW thanks for you response bro

Abhijeet-AR commented 3 years ago

The error says you "FLASK_APP" not provided. Did you set "FLASK_APP" environment variable to main? You can do it by using this command $env:FLASK_APP = "main". If you have problem setting an environment variable, renaming main.py to app.py should help.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.