Pandas module was not found

MontseMontse Member Posts: 9 Contributor II
edited January 15 in Help
Hi,

I have installed the Python extension into RapidMiner.
I have also Anaconda3 installed in my laptop with Python and Pandas library. I can work well with Python into my laptop using Jupyter Notebook.
But when I test Python into Settings\Preferences\Python Scripting, RapidMiner tells me: Detected Python 3.7.0 - Error: Pandas module not found (please install pandas (version 0.12.0+). 
And I have yet installed Pandas 0.23.4.

Someone knows why it happens and how solved it?
Thank you.

Best regards,
Montse

Tagged:

Answers

  • rfuentealbarfuentealba Moderator, RapidMiner Certified Analyst, Member Posts: 218   Unicorn
    Hola @Montse,

    Si tienes Anaconda Python 3 instalado en tu laptop, asegúrate de que en la configuración de preferencias de RapidMiner tengas enlazada la versión de Python que corresponde a tu instalación de Anaconda, y asegúrate de que use el entorno base de anaconda, no un entorno custom sin dependencias. No recuerdo cómo es en Windows, pero en Mac esa configuración es factible de obtener presionando Cmd + ,. De todas maneras, la pantalla que buscas está adjunta en el mensaje.

    Por defecto, si no le especificas a RapidMiner Studio qué versión de Python debería utilizar, encuentra la que está presente en la variable de entorno $PATH (o %PATH% en Windows), que por defecto no tiene numpy y pandas instalado.

    ¡Espero esto te ayude!

    (Por cierto, @Montse es del grupo de RapidMiner en Castellano :wink: ).
  • sgenzersgenzer Administrator, Moderator, Employee, RapidMiner Certified Analyst, Community Manager, Member Posts: 1,960  Community Manager
    @Montse @rfuentealba Sí, pero recuerde ahora en este nuevo sitio web que necesita etiquetar su mensaje como "RapidMiner en Castellano". Entonces puedes ir a este enlace: https://community.rapidminer.com/discussions/tagged/castellano :smiley:
    rfuentealba
  • rfuentealbarfuentealba Moderator, RapidMiner Certified Analyst, Member Posts: 218   Unicorn
    Forgot it. Sorry!
  • rfuentealbarfuentealba Moderator, RapidMiner Certified Analyst, Member Posts: 218   Unicorn
    Hello @Montse,

    (Translated to amend my mistake)

    If you have Anaconda Python 3 in your laptop, make sure to have the Anaconda Python version linked in your RapidMiner preference settings. Also, make sure that it is using the “base” Anaconda environment or one that is not custom.

    I cannot remember how is it in Windows but in Mac that setting can be obtained by pressing “Cmd + ,”.

    By default if you do not specify what version should be used by RapidMiner Studio, it should be present in $PATH. The default one with Linux or Mac doesn’t have numpy and pandas installed.

    Hope it helps!
  • SotaratSotarat Member Posts: 1 Contributor I
    edited December 2018
    Has this issue been solved? Since I've faced the same problem. In Anaconda prompt with base environment, I use "conda list" and it showed me that the pandas 0.23.4 is already installed. The python script worked well in Spyder. However, RapidMiner said that "Error: Pandas module not found" even though the installation list shows the " pandas==0.23.4".

    I'm not that sure does this happens because I upgraded my RapidMiner 9.0 to 9.1?

  • rfuentealbarfuentealba Moderator, RapidMiner Certified Analyst, Member Posts: 218   Unicorn
    @Sotarat ;

    If I'm not mistaken, you are using Windows. You must set the path for your Anaconda Installation, which AFAIK does not add itself to the %PATH% like the Python default installer does. On Mac, this comes on the Application menu (RapidMiner Studio > Preferences) but I don't use Windows, so I can't tell you what's the path. Perhaps someone else can, @sgenzer can you lend me a hand over here?. The window looks like this:


    (I haven't configured Python yet but instead of /usr/bin/python I should put something like /opt/anaconda/bin/python).

    Hope this helps.

  • phellingerphellinger Employee, Member Posts: 79  Guru
    @Sotarat
    That is strange, indeed.
    The test explicitly checks for the Pandas module using the specified path / environment by trying an "import pandas" command. That fails, apparently.
    The package list comes from a "pip" call.

    Would you mind helping us with some details?
    Is the "base" environment selected when doing the test? Does an Execute Python operator report the same error? What happens if you select "specific python binaries" as the "Package manager" instead and specify the path directly? Would you mind sharing the relevant parts of ~/.RapidMiner/rapidminer-studio.log file?

    @rfuentealba, note that parameters changed in Python Scripting 9.1.0. There are more options now besides specifying the exact path to the Python binary.
    rfuentealba
  • John_MacJohn_Mac Member Posts: 4 Contributor I
    edited January 9
    I am having almost the same exact issue as @Sotarat above.  

    I have python 3.7 setup with Anaconda3. I am using windows.  My Anaconda environment seems stable.  My scripts are all working fine.  Below is my python scripting preference setup and when i test I get the error: 

    I believe my search paths are setup correctly as well.

    When I use the python path explicitly I get the following error:


    An Execute Python operator reports the same thing:

    I have set the python path in my environment variables as well, both in the PATH and I created new ones for both PYTHONHOME and PYTHONPATH just be thorough.  Below is some output from the rapidminer-studio log file.  It doesn't tell us much, the beginning is just the loading of the extensions and it doesn't show an error:

    Jan 09, 2019 12:30:06 PM com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester scriptingSetupTest
    WARNING: No Python found on path: <null>
    Jan 09, 2019 12:30:38 PM com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester scriptingSetupTest
    WARNING: Pandas module not found!
    Jan 09, 2019 12:33:53 PM com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester scriptingSetupTest
    WARNING: Pandas module not found!
    Jan 09, 2019 12:34:00 PM com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester scriptingSetupTest
    WARNING: No Python found on path: <null>
    Jan 09, 2019 12:40:33 PM com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester scriptingSetupTest
    WARNING: No Python found on path: <null>
    Jan 09, 2019 12:42:28 PM com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester scriptingSetupTest
    WARNING: Pandas module not found!
    Jan 09, 2019 12:42:42 PM com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester scriptingSetupTest
    WARNING: Pandas module not found!
    Jan 09, 2019 1:07:25 PM com.rapidminer.gui.ProcessThread run
    SEVERE: Process failed: The pandas module for Python was not found.
    com.rapidminer.operator.UserError: The pandas module for Python was not found.
    at com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonScriptRunner.handleLanguageSpecificExitCode(PythonScriptRunner.java:347)
    at com.rapidminer.extension.pythonscripting.operator.scripting.AbstractScriptRunner.run(AbstractScriptRunner.java:165)
    at com.rapidminer.extension.pythonscripting.operator.scripting.AbstractScriptingLanguageOperator.doWork(AbstractScriptingLanguageOperator.java:150)
    at com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonScriptingOperator.doWork(PythonScriptingOperator.java:251)
    at com.rapidminer.operator.Operator.execute(Operator.java:1025)
    at com.rapidminer.operator.execution.SimpleUnitExecutor.execute(SimpleUnitExecutor.java:77)
    at com.rapidminer.operator.ExecutionUnit$2.run(ExecutionUnit.java:812)
    at com.rapidminer.operator.ExecutionUnit$2.run(ExecutionUnit.java:807)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.rapidminer.operator.ExecutionUnit.execute(ExecutionUnit.java:807)
    at com.rapidminer.operator.OperatorChain.doWork(OperatorChain.java:428)
    at com.rapidminer.operator.Operator.execute(Operator.java:1025)
    at com.rapidminer.Process.execute(Process.java:1322)
    at com.rapidminer.Process.run(Process.java:1297)
    at com.rapidminer.Process.run(Process.java:1183)
    at com.rapidminer.Process.run(Process.java:1136)
    at com.rapidminer.Process.run(Process.java:1131)
    at com.rapidminer.Process.run(Process.java:1121)
    at com.rapidminer.gui.ProcessThread.run(ProcessThread.java:65)

    Jan 09, 2019 1:07:25 PM com.rapidminer.gui.ProcessThread logProcessTreeList
    SEVERE: Here: 
    Jan 09, 2019 1:07:25 PM com.rapidminer.gui.ProcessThread logProcessTreeList
    SEVERE:           Process[1] (Process)
    Jan 09, 2019 1:07:25 PM com.rapidminer.gui.ProcessThread logProcessTreeList
    SEVERE:            subprocess 'Main Process'
    Jan 09, 2019 1:07:25 PM com.rapidminer.gui.ProcessThread logProcessTreeList
    SEVERE:        ==>   +- Execute Python[1] (Execute Python)

    I am sure I am missing something simple here, any help would be appreciated.

    Thanks!
  • hughesfleming68hughesfleming68 Member Posts: 114   Unicorn
    edited January 10
    The path setting in the current version is quite simple. You just need to remember to point to the right envs directory if you are using custom environments. From the colours, your installation looks like Windows Server 2012. I do remember a similar problem once. I am pretty sure that I reinstalled Anaconda and that seemed to solve the problem.

    Edit...I see there are now Python and R updates for 9.1. I just installed them to see what has changed.




  • phellingerphellinger Employee, Member Posts: 79  Guru
    @John_Mac
    Thank you for your post and all the details.
    We'll try to reproduce the problem.

    Do you have other Conda environments defined besides "base"? Can you see those listed in the dropdown list? Do you still get the very first error, if you explicitly select "base" from the dropdown and test afterwards?
    May I ask if you have any special or accented character in your home path (where Conda is installed)?

    Peter
  • phellingerphellinger Employee, Member Posts: 79  Guru
    @John_Mac
    One thing that would help us a lot: if you could please increase the log level, we could see more details. You can do that easily, if you open the Log Panel via View -> Show Panel -> Log, and then right click on the new panel, and click on Set log level -> FINEST. After that, please hit the refresh icon next to "Python binary path" property and test again. Your log file should contain much more details.
    Feel free to send me this directly, if you do not want to post it here.
  • John_MacJohn_Mac Member Posts: 4 Contributor I
    edited January 10
    Double Post.. sorry.
  • John_MacJohn_Mac Member Posts: 4 Contributor I
    edited January 10
    Thanks phellinger  and hughesfleming68 , but I have resolved the issue by installing the latest version from python.org.  I then had to install Panda's using pip from the scripts folder of that new installation but once I did that and i pointed it to that python.exe it worked.  I couldn't not seem to get it to work with Anaconda even after a reinstall.. 

    It means that I have 2 separate environments that I have to keep current but I am OK with this for my development machine.

    I still get the error if I switch over to conda, I think it must have something to do with the path, not sure if there are specific registry entries on windows associated with it but I will continue to try to resolve it when I have time and update here if I come up with anything.  

    Thanks, John
    IngoRM
  • John_MacJohn_Mac Member Posts: 4 Contributor I
    Thanks phellinger , but I have resolved the issue by installing the latest version from python.org.  I then had to install Panda's using pip from the scripts folder of that new installation but once I did that and i pointed it to that python.exe it worked.  I couldn't not seem to get it to work with Anaconda. 

    It means that I have 2 separate environments that I have to keep current but I am OK with this for my development machine.

    I still get the error if I switch over to conda, I think it must have something to do with the path, not sure if there are specific registry entries on windows associated with it but I will continue to try to resolve it when I have time and update here if I come up with anything.  

    Thanks, John
  • phellingerphellinger Employee, Member Posts: 79  Guru
    edited 10:29AM
    @John_Mac
    I think we figured out the problem, and can reproduce it now. It can occur if during Anaconda installation, Anaconda did not add itself to the PATH (seems to be a default behaviour now on Windows). I read that you added the path afterwards, but on Windows, you need to add the following subdirectories as well (please replace <conda_path> with your path ending with "Anaconda3"):
    • <conda_path>\Library\mingw64\bin*
    • <conda_path>\Library\usr\bin
    • <conda_path>\Library\bin
    • <conda_path>\Scripts
    • <conda_path>\bin
    After adding these directories to the PATH, you should no longer get "Pandas not found" error. This way you don't have to maintain two Python installations.

    Please let me know if this helps or not.

    We will improve the automation of this in the upcoming Python Scripting release. Thank you for your help so far!

    Best,
    Peter

    *Edit: there was a typo here, sorry, it should be Library\mingw-w64\bin
Sign In or Register to comment.