Sklearn python library not importing

Hello,
I need to scale data in python and I try to use the sklearn.preprocessing library.
I installed it with PIP and it works in command console but inside TD it signal an error:

python >>> import sklearn
TypeError: ‘type’ object is not iterable
python >>>
path” is deprecated, please use “containerCOMP” instead
File “”, line 1019, in _handle_fromlist
requires” is deprecated, please use “containerCOMP” instead
File “”, line 1032, in handle_fromlist
requires” is deprecated, please use “containerCOMP” instead
File "C:/Program Files/Python37/Lib/site-packages\pkg_resources_init
.py", line 574, in _build_master
from main import requires

I have only one 3.7 Python install and my path seems right:
C:/Program Files/Python37/Lib/site-packages
Any idea on what I have done wrong?
Thank you, Jacques

Hello,
I have a similar problem importing the arcgis lybrary (working in command):

python >>> import arcgis
C:/Program Files/Derivative/TouchDesigner.2020.44820/bin/TouchDesigner.exe:159: DeprecationWarning: Using or importing the ABCs from ‘collections’ instead of from ‘collections.abc’ is deprecated, and in 3.8 it will stop working
python >>>
path” is deprecated, please use “containerCOMP” instead
File “”, line 1019, in _handle_fromlist
requires” is deprecated, please use “containerCOMP” instead
File “”, line 1032, in handle_fromlist
requires” is deprecated, please use “containerCOMP” instead
File "C:/Program Files/Python37/Lib/site-packages\pkg_resources_init
.py", line 574, in _build_master
from main import requires
path” is deprecated, please use “containerCOMP” instead
File “”, line 1019, in _handle_fromlist
requires” is deprecated, please use “containerCOMP” instead
File “”, line 1032, in handle_fromlist
requires” is deprecated, please use “containerCOMP” instead
File "C:/Program Files/Python37/Lib/site-packages\pkg_resources_init
.py", line 574, in _build_master
from main import requires
path” is deprecated, please use “containerCOMP” instead
File “”, line 1019, in _handle_fromlist
requires” is deprecated, please use “containerCOMP” instead
File “”, line 1032, in handle_fromlist
requires” is deprecated, please use “containerCOMP” instead
File "C:/Program Files/Python37/Lib/site-packages\pkg_resources_init
.py", line 574, in _build_master
from main import requires

Any idea? Thanks

Hello @jacqueshoepffner ,

Have you been able to find a solution or it is still an issue?

Build number 2020.44820 + Windows 10 for what I can tell ?

Thanks

Hello,
I doesn’t found a solution but isn’t an issue at the moment because I use the Qgis free app to do externaly the job. For the moment I doesnt tried to import another python library because I am on another task but I think there is still a problem for import some python library.
Thank you for your attention, Jacques

Hello,
I made some test on a fresh new windows and Python 3.7.9 install.
sklearn import is working fine. For arcgis its working but I have this warning for future python install in TD:

C:/Program Files/Derivative/TouchDesigner/bin/TouchDesigner.exe:159: DeprecationWarning: Using or importing the ABCs from ‘collections’ instead of from ‘collections.abc’ is deprecated, and in 3.8 it will stop working

Regarding the deprecation error (use “containerCOMP”) at top of thread… that was an internal TD bug in that build and has since been fixed. Installing latest experimental will eliminate that.

Regarding this collections.abc deprecation, that is strange. Does it happen when you load an empty TD project, or just when you try to use sklearn or arcgis? Do you have a toe file that causes this that I could try?

Hello Ivan,
the deprecation warning happen when I try to import the library, withour anything else.
I am not working with python libraries at the moment, just preparing a work with geographical data.
Thanks

I think the deprecation error is in their library then. To make sure, try importing it directly into your Python installation (Python.exe) instead of TouchDesigner.

Hello,
If I import it into power shelf, there is no warning and in python.exe neither

Hmm, very curious. Can you tell me exactly what packages I need and what steps to take to duplicate this error?