XanderStrike / GazelleUI

Download from your Gazelle-based trackers with ease!
59 stars 9 forks source link

ImportError: No module named flask #23

Closed 0xelion closed 7 years ago

0xelion commented 7 years ago

When i try to execute ApolloUI :

Traceback (most recent call last): File "ApolloUI.py", line 7, in <module> from flask import Flask, request, jsonify, render_template, redirect, send_from_directory, Response ImportError: No module named flask

XanderStrike commented 7 years ago

Is this after running pip install -r requirements.txt? Did it give you any errors installing?

0xelion commented 7 years ago

Yes, after running that :/

I've retried and : Requirement already satisfied: requests in /usr/local/lib/python3.4/dist-packages (from -r requirements.txt (line 1)) Requirement already satisfied: funcsigs in /usr/local/lib/python3.4/dist-packages (from -r requirements.txt (line 2)) Requirement already satisfied: futures in /usr/local/lib/python3.4/dist-packages (from -r requirements.txt (line 3)) Requirement already satisfied: flask in /usr/local/lib/python3.4/dist-packages (from -r requirements.txt (line 4)) Requirement already satisfied: flask_apscheduler in /usr/local/lib/python3.4/dist-packages (from -r requirements.txt (line 5)) Requirement already satisfied: Werkzeug>=0.7 in /usr/local/lib/python3.4/dist-packages (from flask->-r requirements.txt (line 4)) Requirement already satisfied: Jinja2>=2.4 in /usr/local/lib/python3.4/dist-packages (from flask->-r requirements.txt (line 4)) Requirement already satisfied: click>=2.0 in /usr/local/lib/python3.4/dist-packages (from flask->-r requirements.txt (line 4)) Requirement already satisfied: itsdangerous>=0.21 in /usr/local/lib/python3.4/dist-packages (from flask->-r requirements.txt (line 4)) Requirement already satisfied: apscheduler>=3.2.0 in /usr/local/lib/python3.4/dist-packages (from flask_apscheduler->-r requirements.txt (line 5)) Requirement already satisfied: python-dateutil>=2.4.2 in /usr/local/lib/python3.4/dist-packages (from flask_apscheduler->-r requirements.txt (line 5)) Requirement already satisfied: MarkupSafe in /usr/local/lib/python3.4/dist-packages (from Jinja2>=2.4->flask->-r requirements.txt (line 4)) Requirement already satisfied: pytz in /usr/local/lib/python3.4/dist-packages (from apscheduler>=3.2.0->flask_apscheduler->-r requirements.txt (line 5)) Requirement already satisfied: six>=1.4.0 in /usr/local/lib/python3.4/dist-packages (from apscheduler>=3.2.0->flask_apscheduler->-r requirements.txt (line 5)) Requirement already satisfied: setuptools>=0.7 in /usr/local/lib/python3.4/dist-packages (from apscheduler>=3.2.0->flask_apscheduler->-r requirements.txt (line 5)) Requirement already satisfied: tzlocal>=1.2 in /usr/local/lib/python3.4/dist-packages (from apscheduler>=3.2.0->flask_apscheduler->-r requirements.txt (line 5))

XanderStrike commented 7 years ago

Could be an issue with your PYTHONPATH? You could try PYTHONPATH=. python ApolloUI.py, or do pip show flask and use whatever location it gives you in PYTHONPATH=<the path> python ApolloUI.py.

Another thing you could try is setting up virtualenv, which I have no experience with but it's supposed to save you from dependency issues like this. Here's a guide I found

Sorry I can't be more help, if you get this worked out let me know.

0xelion commented 7 years ago

It's working thanks :)

XanderStrike commented 7 years ago

Awesome, out of curiosity, which suggestion worked for you?

0xelion commented 7 years ago

It's working with PYTHONPATH=/usr/local/lib/python3.4/dist-packages python ApolloUI.py

So yeah, just a bad PYTHONPATH :/

XanderStrike commented 7 years ago

Thanks, that'll be good to know in case anyone else has this issue.