-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't bump tflite-micro: new "PIL" (Pillow) Python dependency #230
Comments
PIL has some C bits that need compiling, which is why it's just not a plain Python package that you can clone and import. Maybe the best option is to just |
Thanks @danc86 , I thought that would be the answer! But it didn't work as expected on my Ubuntu 20.04LTS laptop nor on my work laptop. I tried Edit: the printf issue is easily remedied by adding |
After working around the above two issues, I encounter this issue:
|
How are you installing the Python dependencies? You should just need to add it to your |
Yes, when we switch to Conda* installation, that is what we will do. Currently, we explicitly set PYTHONPATH to include everything under * Two of the barriers have been addressed (differences in performance Conda vs fresh-built, and lack of a RISCV toolchain package with g++), so we should be able to move forward with using Conda / |
As you have just discovered, manipulating the |
@mithro All the mechanisms for setting up environments have interesting shortcomings. The |
@tcal-x In terms of timing I think we'll be happy with the current TfLM version for the next six months or so, so happy to wait while the environment issues are sorted out. |
The three primary options for Python environments are;
In both (b) and (c) any locally provided dependencies (like through submodules) need to get "installed" into the environment. In (a) any locally provided dependencies (like through submodules) need to get installed onto the users system. However, people hate doing this so they slowly end up re-creating either (b) or (c) poorly (I know because I've fallen into this trap myself). It is actually pretty easy to start with (b) and then add / extend to (c). I have some notes around this topic here. |
I tried bumping the tflite-micro submodule to current main, and encounter "No module named 'PIL'" when building software.
I don't think we have a precedent of using pip to install a missing Python package. I tried cloning https://github.com/python-pillow/Pillow under
third_party/python/
, but it was not found. It may be that the Pillow repository is structured a bit differently than other Python repos -- there is a PIL directory atPillow/src/PIL
.Or perhaps we're currently not setting up PYTHONPATH for the tflite-micro build.
The text was updated successfully, but these errors were encountered: