Python, невозможно импортировать flask -restplus - PullRequest
0 голосов
/ 02 февраля 2020

Я пытаюсь импортировать flaks-restplus. При использовании pip install он говорит, что он успешно установлен, но я не могу использовать его в Pycharm.

$ pip install flask_restplus
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: flask_restplus in /home/yovel/.local/lib/python2.7/site-packages (0.13.0)
Requirement already satisfied: jsonschema in /home/yovel/.local/lib/python2.7/site-packages (from flask_restplus) (3.2.0)
Requirement already satisfied: Flask>=0.8 in /home/yovel/.local/lib/python2.7/site-packages (from flask_restplus) (1.1.1)
Requirement already satisfied: six>=1.3.0 in /home/yovel/.local/lib/python2.7/site-packages (from flask_restplus) (1.14.0)
Requirement already satisfied: aniso8601>=0.82 in /home/yovel/.local/lib/python2.7/site-packages (from flask_restplus) (8.0.0)
Requirement already satisfied: enum34; python_version < "3.4" in /home/yovel/.local/lib/python2.7/site-packages (from flask_restplus) (1.1.6)
Requirement already satisfied: pytz in /home/yovel/.local/lib/python2.7/site-packages (from flask_restplus) (2019.3)
Requirement already satisfied: attrs>=17.4.0 in /home/yovel/.local/lib/python2.7/site-packages (from jsonschema->flask_restplus) (19.3.0)
Requirement already satisfied: functools32; python_version < "3" in /home/yovel/.local/lib/python2.7/site-packages (from jsonschema->flask_restplus) (3.2.3.post2)
Requirement already satisfied: pyrsistent>=0.14.0 in /home/yovel/.local/lib/python2.7/site-packages (from jsonschema->flask_restplus) (0.15.7)
Requirement already satisfied: importlib-metadata; python_version < "3.8" in /home/yovel/.local/lib/python2.7/site-packages (from jsonschema->flask_restplus) (1.5.0)
Requirement already satisfied: setuptools in /home/yovel/.local/lib/python2.7/site-packages (from jsonschema->flask_restplus) (44.0.0)
Requirement already satisfied: itsdangerous>=0.24 in /home/yovel/.local/lib/python2.7/site-packages (from Flask>=0.8->flask_restplus) (1.1.0)
Requirement already satisfied: click>=5.1 in /home/yovel/.local/lib/python2.7/site-packages (from Flask>=0.8->flask_restplus) (7.0)
Requirement already satisfied: Werkzeug>=0.15 in /home/yovel/.local/lib/python2.7/site-packages (from Flask>=0.8->flask_restplus) (0.16.1)
Requirement already satisfied: Jinja2>=2.10.1 in /home/yovel/.local/lib/python2.7/site-packages (from Flask>=0.8->flask_restplus) (2.11.1)
Requirement already satisfied: contextlib2; python_version < "3" in /home/yovel/.local/lib/python2.7/site-packages (from importlib-metadata; python_version < "3.8"->jsonschema->flask_restplus) (0.6.0.post1)
Requirement already satisfied: zipp>=0.5 in /home/yovel/.local/lib/python2.7/site-packages (from importlib-metadata; python_version < "3.8"->jsonschema->flask_restplus) (1.1.0)
Requirement already satisfied: configparser>=3.5; python_version < "3" in /home/yovel/.local/lib/python2.7/site-packages (from importlib-metadata; python_version < "3.8"->jsonschema->flask_restplus) (4.0.2)
Requirement already satisfied: pathlib2; python_version < "3" in /home/yovel/.local/lib/python2.7/site-packages (from importlib-metadata; python_version < "3.8"->jsonschema->flask_restplus) (2.3.5)
Requirement already satisfied: MarkupSafe>=0.23 in /home/yovel/.local/lib/python2.7/site-packages (from Jinja2>=2.10.1->Flask>=0.8->flask_restplus) (1.1.1)
Requirement already satisfied: scandir; python_version < "3.5" in /home/yovel/.local/lib/python2.7/site-packages (from pathlib2; python_version < "3"->importlib-metadata; python_version < "3.8"->jsonschema->flask_restplus) (1.10.0)
(venv) yovel@yovel-BeastPad:~/PycharmProjects/Triangulation-Calculator$ pip install flask_restplus
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: flask_restplus in /home/yovel/.local/lib/python2.7/site-packages (0.13.0)
Requirement already satisfied: jsonschema in /home/yovel/.local/lib/python2.7/site-packages (from flask_restplus) (3.2.0)
Requirement already satisfied: Flask>=0.8 in /home/yovel/.local/lib/python2.7/site-packages (from flask_restplus) (1.1.1)
Requirement already satisfied: six>=1.3.0 in /home/yovel/.local/lib/python2.7/site-packages (from flask_restplus) (1.14.0)
Requirement already satisfied: aniso8601>=0.82 in /home/yovel/.local/lib/python2.7/site-packages (from flask_restplus) (8.0.0)
Requirement already satisfied: enum34; python_version < "3.4" in /home/yovel/.local/lib/python2.7/site-packages (from flask_restplus) (1.1.6)
Requirement already satisfied: pytz in /home/yovel/.local/lib/python2.7/site-packages (from flask_restplus) (2019.3)
Requirement already satisfied: attrs>=17.4.0 in /home/yovel/.local/lib/python2.7/site-packages (from jsonschema->flask_restplus) (19.3.0)
Requirement already satisfied: functools32; python_version < "3" in /home/yovel/.local/lib/python2.7/site-packages (from jsonschema->flask_restplus) (3.2.3.post2)
Requirement already satisfied: pyrsistent>=0.14.0 in /home/yovel/.local/lib/python2.7/site-packages (from jsonschema->flask_restplus) (0.15.7)
Requirement already satisfied: importlib-metadata; python_version < "3.8" in /home/yovel/.local/lib/python2.7/site-packages (from jsonschema->flask_restplus) (1.5.0)
Requirement already satisfied: setuptools in /home/yovel/.local/lib/python2.7/site-packages (from jsonschema->flask_restplus) (44.0.0)
Requirement already satisfied: itsdangerous>=0.24 in /home/yovel/.local/lib/python2.7/site-packages (from Flask>=0.8->flask_restplus) (1.1.0)
Requirement already satisfied: click>=5.1 in /home/yovel/.local/lib/python2.7/site-packages (from Flask>=0.8->flask_restplus) (7.0)
Requirement already satisfied: Werkzeug>=0.15 in /home/yovel/.local/lib/python2.7/site-packages (from Flask>=0.8->flask_restplus) (0.16.1)
Requirement already satisfied: Jinja2>=2.10.1 in /home/yovel/.local/lib/python2.7/site-packages (from Flask>=0.8->flask_restplus) (2.11.1)
Requirement already satisfied: contextlib2; python_version < "3" in /home/yovel/.local/lib/python2.7/site-packages (from importlib-metadata; python_version < "3.8"->jsonschema->flask_restplus) (0.6.0.post1)
Requirement already satisfied: zipp>=0.5 in /home/yovel/.local/lib/python2.7/site-packages (from importlib-metadata; python_version < "3.8"->jsonschema->flask_restplus) (1.1.0)
Requirement already satisfied: configparser>=3.5; python_version < "3" in /home/yovel/.local/lib/python2.7/site-packages (from importlib-metadata; python_version < "3.8"->jsonschema->flask_restplus) (4.0.2)
Requirement already satisfied: pathlib2; python_version < "3" in /home/yovel/.local/lib/python2.7/site-packages (from importlib-metadata; python_version < "3.8"->jsonschema->flask_restplus) (2.3.5)
Requirement already satisfied: MarkupSafe>=0.23 in /home/yovel/.local/lib/python2.7/site-packages (from Jinja2>=2.10.1->Flask>=0.8->flask_restplus) (1.1.1)
Requirement already satisfied: scandir; python_version < "3.5" in /home/yovel/.local/lib/python2.7/site-packages (from pathlib2; python_version < "3"->importlib-metadata; python_version < "3.8"->jsonschema->flask_restplus) (1.10.0)

enter image description here

Кроме того, я установил более новую версию python, как мне сделать ее глухой на моей машине?

yovel@yovel-BeastPad:~$ python --version
Python 2.7.17
yovel@yovel-BeastPad:~$ python
python            python2.7-config  python3.6         python3m
python2           python2-config    python3.6m        python-config
python2.7         python3           python3.8   
...