Please, I’m kinda stupid, I can’t figure this out and I’d really appreciate an advice.
I’d like to import a pip installed package. Currently I have a virtual environment (venv) set up in a separate directory, I’d like to grab/copy/anything possible/… a package installed through pip install package_name but I have no idea how to do this so it’s available in my krita plugin, please?
I’d be nice if I could distribute the plugin with the package without the user needing to install it on their own.
Hm, that does seem overlycomplicated and expects a user to be able to install python that sounds unfortunately prohibiting.
Thanks a lot anyway it’s helpful to see this.
EDIT: @Grum999 I asked in the chat, it seems missing pip on windows is not a Krita problem but just a way how it works on windows, apparently if you know how to inject it into krita installation you can let people know, they might not be against it, which sounds to me like it’s probably a huge pain if it’s even remotely possible xD.
EDIT: @Grum999
This is the whole answer I got from amyspark: I think it's fully "you're on your own" territory, at least where Windows is concerned (because embedded Python doesn't ship an interpreter)... but i think so, yes. if you find a way to inject pip into the installation^^
It has more than one reason why users should NOT do anything in the directory where Krita is installed, for instance the thing I wrote above, also it is the main reason for users having issues with Krita.
There is nothing complicated with a longer path to a well known location.
“Hints” like yours make supporting users who have problems with Krita not only more difficult, but also more likely and more frequent. Because which supporter suspects that users are messing around in directories they have no business in, no, such “hints” will also increase the number of those who will have problems with Krita, because the number of those who, out of incompetence, will ruin their Krita in this way will increase, only the proven solutions are not applicable to such capital user errors.
Thank you!
I can only strongly advise against implementing such tips yourself, at least if you are not in a position to rectify the damage yourself. And that is probably over 95% of those users who would never have thought of this themselves.
Sorry for the late reply, but yeah - you’re right
No need to do that
I don’t know why I answered like that - maybe I didn’t read the question carefully and thought it was about Scripter
Answering the first question:
If you’re making a PLUGIN, to import your own libraries, you need to write a proper init.py