Select to view content in your preferred language

Is it possible to install Scikit -Learn on ArcMap 10.8?

946
3
Jump to solution
01-24-2023 11:18 AM
Manu
by
Regular Contributor

I am working on a Windows computer of my company and I want to use Scikit-Learn in an ArcMap Python Toolbox. Is this possible? If so, how can I install it?

For smaller packages that are exclusively written in Python, I managed to just make a local copy of the Package and to add it using

sys.path.append()

However, this did not work for Scikit-Learn.
If possible, I would not only use Scikit-Learn but also distribute it along with the Toolbox.

0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

You will need ArcGIS Pro to work with a suitable conda environment.  ArcMap isn't being upgraded any further so you might want to switch to it for those functions that can't or can no longer be done in ArcMap and its environments.

Also, many science, ml and ai packages no longer support python <= 3.8 and plans are in the works to abandon 3.9 in the near-ish future so moving forward may be your best option.


... sort of retired...

View solution in original post

3 Replies
DanPatterson
MVP Esteemed Contributor

arcmap == python 2.7, scikit-learn may have dropped support for its newest versions. so give the conda package manager a try.  If it looks good, drop the --dry-run portion (which just says what it is going to do without actually doing it)

>>> conda install scikit-learn --dry-run

... sort of retired...
0 Kudos
Manu
by
Regular Contributor

Unfortunately, it only finds scikit-learn==0.20.4 which apparently does not work with numpy==0.9.3 (upon import, it fails with ValueError: numpy.dtype has the wrong size, try recompiling. Expected 52, got 56) and pip cannot downgrade numpy...

0 Kudos
DanPatterson
MVP Esteemed Contributor

You will need ArcGIS Pro to work with a suitable conda environment.  ArcMap isn't being upgraded any further so you might want to switch to it for those functions that can't or can no longer be done in ArcMap and its environments.

Also, many science, ml and ai packages no longer support python <= 3.8 and plans are in the works to abandon 3.9 in the near-ish future so moving forward may be your best option.


... sort of retired...