jdf / Processing.py-Bugs

A home for all bugs and feature requests about Python Mode for the Processing Development Environment.
41 stars 8 forks source link

Processing library issue VSCODE #363

Closed marziabil closed 1 year ago

marziabil commented 1 year ago

I can't seem to import an external python library into my main processing file in VS Code. Here's the link to my code: https://github.com/marziabil/emojis/tree/main/emoji

I was trying to import simpful in the file emoji.pyde; the simpful library is working fine by itself in the same folder.

I am getting an error that the module can't be found when I try to run the emoji file.

tabreturn commented 1 year ago

You could download the simpful tar.gz from PyPi (https://pypi.org/project/simpful/#files), then extract the simpful folder and place it in the root of your sketch directory so that you have something like --

emoji
├── emoji.pyde
├── simpful
│   ├── __init__.py
│   ├── fuzzy_aggregation.py
│   ├── ...
├── ...

This should solve your initial import issue -- but you'll run into another problem: the NumPy dependency. Processing.py doesn't support Python libraries with C-extensions. The solution might be to:

* I must disclose that I'm involved in the py5 project

marziabil commented 1 year ago

Thank you for your response! I am currently trying to run the project with py5! :)