S
S
Sazoks2021-04-29 09:42:00
Flask
Sazoks, 2021-04-29 09:42:00

How to install an old version of Flask?

Good day to all!
Such a problem: I am writing a semester project in my first year. I am writing it in Flask.
To work with the database, I decided to use SQLAlchemy, namely the ORM in it.

The crux of the problem is that all the examples and books I've found use the following import entry: But my version of Flask's simply doesn't have ext. Okay, I thought. I downloaded the flask_sqlalchemy module separately . Earned. Created models, created tables in the database. Hooray! But the problems didn't end there. In all examples, sessions are used to work with the database, and this is the entry:
from flask.ext.sqlalchemy import SQLAlchemy


db.session.add(model_obj)
Model.query.all()

I gave this as an example. So neither of these works for me.
Then I realized that, apparently, I just have the latest version of Flask and the SQLAlchemy module.
In this regard, I ask you to poke your nose on how to install the required version of Flask so that everything works. Or, although this is not the topic of the question, tell me where to find up-to-date information for the latest version. Off. the docks are very unfriendly, in my opinion.

Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Sokov, 2021-04-29
@MishaSok

You must use the --force-reinstall flag. To upgrade or downgrade a package to a specific version, you must use the --force-reinstall flag. The below command should work.
pip install --force-reinstall flask==1.0.2
Source: https://coderoad.ru/50571372/%D0%9A%D0%B0%D0%BA-%D...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question