POST
|
Hi Sandeep Kumar, Looks like ArcGIS Pro v2.5 was the key here. Once I updated, created a new clone, and used your command (conda install -c esri arcgis fastai pillow scikit-image --no-pin), I no longer receive module errors. Thanks for your help! Thank you as well Dan Patterson.
... View more
03-04-2020
09:19 AM
|
2
|
7
|
1697
|
POST
|
I've been installing all modules through the Python Command Prompt. That screen capture is of VS Codes terminal, so it is a bit misleading.
... View more
03-04-2020
09:13 AM
|
0
|
0
|
881
|
POST
|
Hi Sandeep Kumar, I did as you suggested. Built a new clone and used the conda command you provided. Same problems continue. Something to do with the import statements in the _data.py file. Occurs on the import of: from fastai.vision.data import imagenet_stats, ImageItemList Nothing is executed after this line in the _data.py and so my Python scripts leveraging the prepare_data() function fail, claiming that I do not have the required modules. My next test is to update ArcGIS Pro to v2.5.0, as I'm at V2.4.3. Once updated I'll create another fresh clone and use the command you provided. Tom
... View more
03-04-2020
08:58 AM
|
0
|
14
|
881
|
POST
|
Hey Dan Patterson, Tested using the --no-pin and the documented solution to installing these modules: conda install -c fastai -c pytorch fastai=1.0.54 pytorch=1.1.0 torchvision --no-pin This did not resolve the problem. Great idea though, I was hopeful. Thanks again for the suggestion. Tom
... View more
03-04-2020
08:45 AM
|
0
|
2
|
881
|
POST
|
Hi Dan Patterson, I did try the --no-pin when installing the modules in my old environment and it did not resolve the problems. I'll create a third environment and test it again just to make sure there were no dependency miss-matches. Thanks for the suggestion, Tom
... View more
03-04-2020
08:00 AM
|
0
|
3
|
881
|
POST
|
Some progress on this. I believe this issue is related to the _data.py file. Something, at least on my machine, is causing the import statements within the try/except to stop working. Specifically, it is the import statement: from fastai.vision.data import imagenet_stats, ImageItemList Any statement defined after this line is skipped and fails, and so an exception is thrown and HAS_FASTAI will always equal false. Interestingly, the interpreter throws no errors. It just exits and appears to have executed successfully. My debugger wasn't working, so I implemented some print statements to test. try:
print("---_data.py Modules & Versions---")
import fastai
print("fastai installed at version: ",fastai.__version__)
import torchvision
print("torchvision installed at version: ",torchvision.__version__)
import torch
print("torch installed at version: ",torch.__version__)
print("Before Import from fastai.vision.data import imagenet_stats, ImageItemList")
from fastai.vision.data import imagenet_stats, ImageItemList
print("After Import from fastai.vision.data import imagenet_stats, ImageItemList") This is quite bizzare. What do you guys think? Tom
... View more
03-04-2020
07:45 AM
|
0
|
0
|
881
|
POST
|
Hey Sandeep Kumar, I'm also seeing this issue with arcgis.learn. I've following the guide in Geospatial deep learning with | ArcGIS for Developers and installed the modules within a new environment successfully. When running prepare_data() function from the learn module within Jupyter Notebooks, it throws the _raise_fastai_import_error(), claiming that it requires those modules listed in the original post. However, interestingly, when I run the _data.py file directly within VS Code, it succeeds and no exception is thrown. I've confirmed that the environment I'm running is the same between my Jupyter Notebook & VS Code, AppData\Local\ESRI\conda\envs\arcgispro-py3-clone1. So I do not know why the exception occurs in Jupyter Notebooks, but does not in VS Code. This problem I'm seeing may also be the root cause of why others experience this problem, so I'm posting here with these findings. I'll do some more debugging today and if I find the solution to my problem, I'll post a reply with the fix. Tom Thompson, Esri Canada Technical Support.
... View more
03-04-2020
06:59 AM
|
0
|
6
|
881
|
Title | Kudos | Posted |
---|---|---|
2 | 03-04-2020 09:19 AM |
Online Status |
Offline
|
Date Last Visited |
02-14-2022
08:25 AM
|