Open-source Languages & Tools for z/OS

 View Only
Expand all | Collapse all

VIM installed with miniconda on z/OS seems to be defect

  • 1.  VIM installed with miniconda on z/OS seems to be defect

    Posted 11-26-2021 14:16

    Dear community,
    I have installed vim via miniconda. When I call it, the Help information which is normally shown in the middle of the screen, is shown at the bottom.

    In the version installed directly in the past, it looks like this:

    I tried some hints which were given in the forum but nothing changed.

    unset TERMINFO

    export VIM=/usr/lpp/rocket/share/vim/vim80

    add  set t_RV= to .vimrc

    Hints are very welcome!

    Regards
    Juergen



    ------------------------------
    Jurgen Hildebrandt
    Systemprogrammer Mainframe Plattform Management
    T-Systems International GmbH
    Düsseldorf DE
    ------------------------------


  • 2.  RE: VIM installed with miniconda on z/OS seems to be defect
    Best Answer

    ROCKETEER
    Posted 11-26-2021 20:35
    Hello Juergen,

    It seems you didn't activate conda environment. You should activate base conda environment at first by executing such commands (which can be placed in your ~/.bashrc file):
    . {path_to_miniconda}/etc/profile.d/conda.sh
    conda activate base​

    Then you can activate another environment (conda activate ...) if vim was installed not in the base environment. After that all necessary environment variables will be set by conda and vim should work correctly.

    --
    Regards,
    Vladimir

    ------------------------------
    Vladimir Kudriakov
    Rocket Software
    ------------------------------



  • 3.  RE: VIM installed with miniconda on z/OS seems to be defect

    Posted 11-28-2021 12:49
    Hello Vladimir,

    Thank you for your hint. With activated conda environment it works. But my intention is to run vim without conda.

    I have tested something and found that entry
    export ASCII_TERMINFO=/usr/lpp/rocket/share/terminfo
    will fix my problem.

    I will do some further tests to verify full functionality.

    Kind Regards
    Jürgen

    ------------------------------
    Jurgen Hildebrandt
    Systemprogrammer Mainframe Plattform Management
    T-Systems International GmbH
    Düsseldorf DE
    ------------------------------



  • 4.  RE: VIM installed with miniconda on z/OS seems to be defect

    Posted 01-05-2023 10:25

    I have the same error.  I am using a miniconda/conda setup as provided by someone else.  I have gotten terminal colors to work by building my own terminfo database.  I've tried to run the condo.sh script as shown above but it seems the condo setup is incorrect I'm using.  I'll investigate more and provide details as I can.

    With that said, this is my setup and error:

    shows vim initial text in one line


    ------------------------------
    John Davis
    Developer
    Rocket Forum Shared Account
    ------------------------------



  • 5.  RE: VIM installed with miniconda on z/OS seems to be defect

    Posted 01-05-2023 14:11
    Ok. I started the process over from official sources.  This provides a different result.  Here is my workflow:

    Obtain the 2.0 version of conda.  Download via this page the   following:

    • miniconda-zos-2.0-2022-01-17.run
    • zOS Miniconda documentation.pdf
    The pdf has install instructions which I will comment on since they seem to be out of date.

    Install steps per documentation:

    1. chmod +x miniconda-zos-yadayada.  This make sense. Its specifying to be executable so we can source the script.
    2. It says to chat -tc 819 a manifest.txt file.  However, the 2.0 version does not have a corresponding manifest file.  This appears that the documentation is in error.
    3. The next section about setting the environment mods to .profile are in error.  The two explicit exports provided do persist in the bash shell.  The implicit exports provided by sourcing the ..../profile.d/conda.sh script do not.  For instance, with the .profile mods as specified, if I login, I get the bash prompt but `type condo` results in nothing.  If I run in my current shell, the installation path to condo.sh then I can do 'type conda' and it results in the conda function.  See screenshot.
      screenshot
    4. Moving on.  During the setup I chose the public conda channels.  However, I need to contact our system admins to see if we have access to a paid version.  However, I create a conda environment and activate it.  Subsequently I try to search/install vim and it's not available. 
    So rather than try to use our older - possibly broken installed rocket tool which has a non working vim, what do I need to do in order to install vim with my user install conda 2.0 version?  Please advise.

    ------------------------------
    John Davis
    Developer
    Broadcom Corporation
    ------------------------------



  • 6.  RE: VIM installed with miniconda on z/OS seems to be defect

    Posted 01-06-2023 11:20
    Hmm. After reinstalling conda2.0 I'm a little confused.  I'm using the public channel.  Perhaps it's not what I thought it was.  It has some tools but not vim.  It has things like python in the bin directory but if you use the path setup by conda they are not accessible.  For instance,   If I do this procedure after installing the .run file 

    Set up .profile as 

    ```
    export _BPXK_AUTOCVT=ON
    export _CEE_RUNOPTS="FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)"
    SHELL=/plexc1/u/users/hostbridge/hbjs/conda2_0/bin/bash
    exec $SHELL
    ```
    And upon login, execute the following command to get `conda` access:

    ```
    $ . /plexc1/u/users/hostbridge/hbjs/conda2_0/etc/profile.d/conda.sh
    ```

    Then create and activate a conda (virtual env?) environment:

    ```
    $ conda create testy_env
    $ conda activate testy_env
    ```

    My resultant path will be modified as such:


    ```
    $ echo $PATH
    /plexc1/u/users/hostbridge/hbjs/conda2_0/envs/testy/bin:/z/JD895801/bin:/usr/lpp/IBM/zoautil/env/bin:/usr/lpp/IBM/zoautil/bin:/usr/lpp/IBM/cyp/v3r9/pyz/bin:./:/bin:/usr/sbin:/usr/lpp/NFS:/usr/lpp/Printsrv/bin:/C/Rocket/bin:/u/users/nfs/endevor
    ```

    The `/plexc1/u/users/hostbridge/hbjs/conda2_0/bin` directory has various tools in it, but not a vim. Tools
    of note are:

    * anaconda
    * bash
    * bunzip2/bzip2/bzcat/bzdiff
    * conda - this is different from the conda function?
    * activate/deactivate
    * jupyter (but not jupyter-notebook?)
    * pip/pip3
    * various pythons which are links to same python,python3
    * sqlite
    * xzless but not less?

    What is odd, is that this path is not included if you use the setup procedure described by rocket. For instance
    if you use `python` it uses the python in `/usr/lpp/IBM/zoautil/env/bin/python`, even if you are in a
    `conda activate testy` session.

    However, if you attempt to install `python` or even search for `python` via `conda install python` or `conda search *python*` you get no results with the public rocket conda channel.  Lastly, the tools Jupyter is not the Jupyter-notebook I am familiar with.  I guess it does not matter since it's not in the path.  If I look to see what is in the dir added by the conda function, I see that it's not even there. Ie. .../bin is not there.  

    ```
    $ ls /plexc1/u/users/hostbridge/hbjs/conda2_0/envs/testy
    conda-meta
    ````

    Am I missing something?

    ------------------------------
    John Davis
    Developer
    Broadcom Corporation
    ------------------------------



  • 7.  RE: VIM installed with miniconda on z/OS seems to be defect

    Posted 01-06-2023 13:00
    Hello John,

    It seems that you are doing the same mistake as I did. Before you create and activate your environment testy_env you have to activate the miniconda base environment via: conda activate
    If this was successful,  "(base)" should be added to the beginning of your prompt. If you check your $PATH afterwards, the bin directory of your miniconda installation should be at the top.

    I hope this will help.

    Regards Juergen

    ------------------------------
    Jurgen Hildebrandt
    Systemprogrammer Mainframe Plattform Management
    T-Systems International GmbH
    Bamberg DE
    ------------------------------



  • 8.  RE: VIM installed with miniconda on z/OS seems to be defect

    Posted 01-06-2023 14:06
    Hello Jurgen,

    Thanks for your reply.   My understanding is that if you create an environment it uses base as well the base.  Perhaps I am wrong.  Let me try your suggestion with a 1.2 setup.

    1. ssh to zos
    2. At this point, my .profile has done this:
    #
    # per rocket common setting
    #
    export _BPXK_AUTOCVT=ON
    export _CEE_RUNOPTS="FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)"
    #
    # rocket conda 1.2 setting
    #
    SHELL=/plexc1/u/users/hostbridge/hbjs/conda1_2/bin/bash
    #
    # Invoke rocket conda 1.2/2.0 bash
    #
    exec $SHELL
    3.  invoke the conda.sh script.
    . /plexc1/u/users/hostbridge/hbjs/conda1_2/etc/profile.d/conda.sh
    This provides the conda function as a bash function.   This can be seen by doing `type conda` before and after invoking the script.  I am also at this point running bash from the conda1.2 installation.  Note I installed from "USSP-2043 Rocket Open AppDev for Z (free solution)" webpage.  My install also uses the public free channel.  At this point, my PATH has not been modified.  As far as this shell knows at this point, rocket is not installed other than bash.
    4. `conda activate base`
    At this point my prompt is prepended with '(base)' as expected.  I've already noticed that nothing in the install directory contains a vim executable.
    5. Attempt to find/use vim.  No dice.  Show the result including how envs are listed.  Base and testy are equivalent with just asterisk showing base is currently active.

    ss

    Thanks again for your help.  How did you get vim though?


    ------------------------------
    John Davis
    Developer
    Broadcom Corporation
    ------------------------------



  • 9.  RE: VIM installed with miniconda on z/OS seems to be defect

    Posted 01-06-2023 17:03
    Hello John,

    You have only created an empty environment. You have to install now the software you want. Miniconda will add automatically all needed packages.

    For installing vim you can use the command which I've collected from the Anaconda page for vim:
    conda install -c zoss-appdev vim

    Homepage: https://anaconda.org/zoss-appdev/vim

    ------------------------------
    Jurgen Hildebrandt
    Systemprogrammer Mainframe Plattform Management
    T-Systems International GmbH
    Bamberg DE
    ------------------------------



  • 10.  RE: VIM installed with miniconda on z/OS seems to be defect

    Posted 01-06-2023 17:09
    conda install -c zoss-appdev vim  will install:

    # Name     Version      Build    Channel
    ncurses     6.1                12           zoss-appdev
    vim              8.0.0022    0            zoss-appdev

    ------------------------------
    Jurgen Hildebrandt
    Systemprogrammer Mainframe Plattform Management
    T-Systems International GmbH
    Bamberg DE
    ------------------------------



  • 11.  RE: VIM installed with miniconda on z/OS seems to be defect

    Posted 01-09-2023 11:43
    Hello Jurgen,

    You have made my day!  Many thanks!

    Odd, the command requires -c boss-appdev switch.  If I do `conda search *foo*` that channel shows up as a default channel.

    Anyway, I appreciate the help.  Have a good one,

    John

    ------------------------------
    John Davis
    Developer
    Broadcom Corporation
    ------------------------------