首页 > 解决方案 > How to install and use python libraries in mac using PIP with terminal

问题描述

Firstly i'm new to python environment.

I installed PIP in mac using terminal and the python version is 2.7.16. I want to install and use Simple Image annatator(https://github.com/sgp715/simple_image_annotator).

I install flask(pip install flask) and i did cd into the cloned folder if simple image annotator. For reference please see the github repo for installation steps.

Than after i don't know what to do to use this library if i run this command(python app.py /images/directory) it gives No files.

How can i install and use the simple image annotator in mac can somebody please tell me the setup process steps.

working with python libraries is entirely new to me. Thanks in advance.

BELOW IS EDITED QUESTION FOR MORE EXPLANATION:

I installed flask and moved to the cloned folder please see the terminal commands as shown in screenshot.

enter image description here

Next remaining installation steps are:

  1. start the app

  2. $ python app.py /images/directory

you can also specify the file you would like the annotations output to (out.csv is the default)

  1. $ python app.py /images/directory --out test.csv

  2. open http://127.0.0.1:5000/tagger in your browser only tested on Chrome

I don't know how to execute remaining steps. images are available in downloads/images folder in my mac.

How to execute these commands?


Screenshots to explain more:

enter image description here

enter image description here

标签: pythonpython-3.xpython-2.7flaskpip

解决方案


问题可能来自您的 python 版本。

尝试使用 python3(如果已安装)

python3 app.py /images/directory


推荐阅读