Cloud Pak for Data

Cloud Pak for Data

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  Wate Studio Notebook Python Package Consistency

    Posted Thu April 16, 2020 08:00 AM
    Edited by System Admin Fri January 20, 2023 04:15 PM
    I noticed that the Jupyter notebook for Python 3.6 environment keeps resetting itself. Is there a way to avoid that?

    Let me explain - ibmdbpy package (V0.1.5) throws an error when connecting with Db2 because it is not compatible with jaydebeapi package (>1.0.0). So, I have to manually alter the environment to make it work. The issue is that the changes I make keep getting reset to the original every once in a while. How do I ensure that any new python package I install in the environment does not get removed?

    ------------------------------
    V George
    ------------------------------
    #CloudPakforDataGroup


  • 2.  RE: Wate Studio Notebook Python Package Consistency

    Posted Thu April 16, 2020 08:08 AM
    Hi,

    The Jupyters will stop after 18h of inactivity.
    We could potentially modify it,  but that's not something we support.

    Did you try using a custom environment ?

    Thanks

    ------------------------------
    TOMASZ HANUSIAK
    ------------------------------



  • 3.  RE: Wate Studio Notebook Python Package Consistency

    Posted Thu April 16, 2020 08:34 AM
    Thanks, Tomasz. 

    Will a custom environment not be reset? I do not know how to create a custom environment for CPD notebooks. Do you have a link that talks about how do it?

    ------------------------------
    V George
    ------------------------------



  • 4.  RE: Wate Studio Notebook Python Package Consistency

    Posted Thu April 16, 2020 08:58 AM
    It would still be reset, but your changes should be kept:

    https://www.ibm.com/support/knowledgecenter/en/SSQNUZ_2.5.0/wsj/analyze-data/customize-envs.html

    ------------------------------
    TOMASZ HANUSIAK
    ------------------------------



  • 5.  RE: Wate Studio Notebook Python Package Consistency

    Posted Mon April 20, 2020 08:29 AM
    Thank you. I was trying to set it up but am getting an error. Can you please help with it?

    """
    /var/ibm/logs/customization-20200420_115736.log
    Customizations to apply in Python-3.6:
    --------------------------------------------------------------
    # Please add conda channels here
    channels:
    - defaults

    # Please add conda packages here
    dependencies:

    # Please add pip packages here
    # To add pip packages, please comment out the next line
    - pip:
       - jaydebeapi==0.2.0
    --------------------------------------------------------------

    + conda env update -n Python-3.6 -f /var/ibm/custom/conda-env-update.yml
    Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.
    Collecting package metadata: ...working... done
    Solving environment: ...working... /opt/ibm/ws/bin/custom_conda.sh: line 80: 47 Killed conda env update -n "$conda_env" -f "$ceu_file"
    + indicate-problem
    + touch /var/ibm/logs/customization-20200420_115736.log.err

    An error occurred while applying your environment customization. Check the error description you see displayed and possibly modify your customization settings. If you like, you can still get started with your notebook.
    """

     I wanted to let you know that jaydebeapi==1.1.1 is installed by default. I am only trying to get an older version of this package i.e. 0.2.0 installed instead above.

    ------------------------------
    V George
    ------------------------------



  • 6.  RE: Wate Studio Notebook Python Package Consistency

    Posted Tue April 21, 2020 06:02 AM

    Hi,

    Can you check using this configuration?:

    channels:
      - main
      - nodefaults
    # Please add conda packages here
    dependencies:
      - scikit-image=0.14.1
      - pip:
        - jaydebeapi==0.2.0


    ------------------------------
    TOMASZ HANUSIAK
    ------------------------------