P4D-Data-Sciences icon indicating copy to clipboard operation
P4D-Data-Sciences copied to clipboard

Some bad modules...

Open peardox opened this issue 2 years ago • 2 comments

OK, two of them are mine :)

Wrote a little checker you can find on https://github.com/peardox/PythonSink

Stuff that fails to import = keras + qt5 Stuff that won't install= tensorflow

The import issues are most likely naming problems (like Pillow wanting to be called PIL - easy to fix)

Tensorflow - that had a bad time installing - maybe a dependancy or something - the above repo showed me this... ModuleNotFoundError: No module named 'termcolor'

The output of a quick module test looked like this...

boto3 imported OK as version 1.24.65
h5py imported OK as version 3.7.0
keras FAILED TO IMPORT
matplotlib imported OK as version 3.5.3
moviepy imported OK as version 1.0.3
nltk imported OK as version 3.7
numpy imported OK as version 1.21.6
onnxruntime imported OK as version 1.12.1
cv2 imported OK as version 4.6.0
cv2 imported OK as version 4.6.0
pandas imported OK as version 1.4.4
PIL imported OK as version 9.2.0
psutil imported OK as version 5.9.1
pyqt5 FAILED TO IMPORT
torch imported OK as version 1.12.1+cpu
torchvision imported OK as version 0.13.1+cpu
rembg imported OK as version 2.0.24
sklearn imported OK as version 1.1.2
scipy imported OK as version 1.7.3
tensorflow FAILED TO IMPORT
17 out of 20 succesful imports

peardox avatar Sep 02 '22 14:09 peardox

Checked out Keras and Qt5

QT5 has a specific naming, changing it to PyQt5 made it 'better' (though there's no PyQt5.version)

Keras is already correctly named

Both of these modules are actually add-ons for other modules (TF uses kera and graphics stuff uses QT5)

I sorta think there should be a way to mark a module that needs installing but never importing as some kind of extension library for use by other things.

In the case of QT5 it tries installing every time so also something to say 'this installed OK, don't try installing again' seems a good idea (although keras didn't keep installing...)

Like you've got IsInstalled maybe we need IsLibrary?

peardox avatar Sep 02 '22 15:09 peardox

I thought to resolve dependencies in the PIP way.

lmbelo avatar Sep 05 '22 18:09 lmbelo