On 01/12/2017 10:44 AM, Alec Leamas wrote:
Hi out there!
I'm dipping my toes in flask, completely newbie. Doing so, I see a lot
of fedora flask packages, but no-one anywhere recommends using these -
it's all about pypi.
I "think" I prefer the packaged version, partly because I'm using
another package with native code (which, as I understand it, isn't that
easy to make a linux pypi package of). However, I'm stuck at the very
beginning:
$ ./run_flask
...
ImportError: No module named 'flask.cli'
So, my question: is it possible to run a flask application using the
packaged components similar to run_flask above, in any way? If so, how?
What is ./run_flask? Is this a script you wrote yourself?
On my Fedora 25, I can import flask.cli from the system packages just
fine. But note that Fedora 24 has an older version of Flask packaged –
one that doesn't include flask.cli yet.
Generally, you're better off using a virtual environment and PyPI,
unless you're making some software specifically for Fedora.
Packages with native code aren't as much of a problem nowadays as they
used to be, but if you still run into trouble, we'll be happy to help :)
--
Petr Viktorin