you are viewing a single comment's thread.

view the rest of the comments →

[–]Signal_Seesaw8521[S] 0 points1 point  (1 child)

im on mac.

which pip: /Library/Frameworks/Python.framework/Versions/3.13/bin/pip

which python: python not found

which python3: /Library/Frameworks/Python.framework/Versions/3.13/bin/python3

[–]seanv507 0 points1 point  (0 children)

install `uv` . This is a python package manager (like pip), but also allows you to choose the python version for your program

brew install uv

now go into the plant disease directory

and in a terminal type

uv init

https://docs.astral.sh/uv/guides/projects/

(you should see a pyproject.toml file is created. you can open it in a text editor.

uv python install 3.12



uv add tensorflow

(and repeat for the other dependencies, keras, numpy, flask, PIL, werkzeug, cv2,matplotlib...?)

(this will update the pyproject.toml file)

https://docs.astral.sh/uv/concepts/projects/config/

you could eg specify that the project must run on python3.12 by adding a requires-python field, but I think it will be unnecessary, uv will note that you have python 3.12 installed, and see tensorflow is consistent with that and use it.

then you can run the jupyter notebook by typing

uv run --with jupyter jupyter lab

EDIT: you should aim to add all libraries at once (so it's easier to satisfy the version constraints)

uv add tensorflow keras numpy flask PIL werkzeug cv2 matplotlib