No module named 'scipy' when using Object Detection Analysis

Solved!
AshleyKaru
Level 2
No module named 'scipy' when using Object Detection Analysis

I got the error message after attempting to train the module:

-------------------------------------------------------------------------------------------------------

Training failed

Failed to train : <class 'ModuleNotFoundError'> : No module named 'scipy'
-------------------------------------------------------------------------------------------------------
 

If anyone can advise on how to install missing modules that'd be great, thanks.

 

 

Operating system used: Windows 10


Operating system used: Windows 10

0 Kudos
1 Solution
CatalinaS
Dataiker
 
The error message indicates that the code environment selected for the training does not have the required python module called scipy installed.
 
You could change the code environment from the model's design page > Runtime environment > Code environment and select one code environment that does have the package.
 
If you don't have a code environment with this module, then you can create or modify one by going to Administration > Code Env and add the scipy package in the Requested packages (Pip) textbox in the 'Pacakges to install' tab of the code environment.
 
Screenshot 2023-02-09 at 17.56.21.png

โ€ƒ

View solution in original post

0 Kudos
7 Replies
CatalinaS
Dataiker
 
The error message indicates that the code environment selected for the training does not have the required python module called scipy installed.
 
You could change the code environment from the model's design page > Runtime environment > Code environment and select one code environment that does have the package.
 
If you don't have a code environment with this module, then you can create or modify one by going to Administration > Code Env and add the scipy package in the Requested packages (Pip) textbox in the 'Pacakges to install' tab of the code environment.
 
Screenshot 2023-02-09 at 17.56.21.png

โ€ƒ

0 Kudos
AshleyKaru
Level 2
Author

Hi Catalina thank you for your reply.

Dataiku told me to install a code environment specifically for object detection. 

I now switched to it thanks to your advice but I get the same error (no scipy).

When I inspect the code environment I'm told to use, there is no SciPy listed and there are no options concerning 'Requested packages' like in your image. noscipy.JPG

 

How should I proceed?

0 Kudos
AshleyKaru
Level 2
Author

Hi just following up my last reply.

I have made my own code environment based on the suggested object detection one and 

added scipy manually as shown below underlined in red:

scipyincluded.JPG

 

I then click update, go to my flow, select my new env (obj_detect_custom) and then run the object detection recipe again. 

Unfortunately I still get the same error (ModuleNotFound) which is very confusing because I am certainly now using an env that contains scipy.

Do you know what could be causing this?

Any help appreciated, thanks in advance.

0 Kudos
CatalinaS
Dataiker

You can check if scipy was successfully installed in this code environment on the Currently installed packages tab. Do you see scipy and its version in the list on Currently installed packages?

0 Kudos
AshleyKaru
Level 2
Author

yes it is listed as currently installed: scipyincludedFORSURE.JPG

I have made sure that 'object_detect_custom' is my active code env as well.

0 Kudos
CatalinaS
Dataiker
The screenshot confirms that scipy==1.2.3 is installed in the code environment. 
 

Did you update the code environment on the models training settings and then redeploy the new version to the flow?  

For further assistance I would suggest you open a support ticket on support.dataiku.com and provide job diagnostic and code environment diagnostic. 

0 Kudos
AshleyKaru
Level 2
Author

That's it, I did not update the code environment on the models training settings and then redeploy the new version to the flow. 

I have now done that and it's not asking for scipy anymore (now it wants sklearn but I understand how to fix this).

Thankyou!

0 Kudos