Announcement

Collapse
No announcement yet.

Installing Python on Kubuntu 20.04

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Installing Python on Kubuntu 20.04

    SageMath used to be a client side only math engine. The math prof that led the main support for it over the last 10 or so years decided to take a teaching sabbatical and move SageMath to a cloud only model which, as a side option, generated support income for him. The main target is other math teachers who enroll their students on that cloud under their supervision. SM incorporates several open source math tools, including the calculus engine Maxima, gnuplot, R and others. Nice system, but too much complication for my needs. I can continue using the last stand alone version and lose out on patches and upgrades, or ....

    I could move to Python, which is what I decided to do. I have several projects that I'm working on and they all don't need the same libraries, extensions or plugins. Working on the projects in the same environment often results in a library for one project conflicting with another library used in another project. The solution is to follow in WINE's footsteps and create different "wine bottles" for different applications so that changing, adding or removing libraries to one project won't kill another project. In Python these "wine bottles" are called virutal environments. Here is how you set them up.

    Make sure your system is updated:
    sudo apt update
    sudo apt full-upgrade


    See if Python is already installed and what version.
    python3 -V

    More than likely, like my system, both python 2.7.18 and python 3.8.5 are already installed.

    Install python's pip command:
    sudo apt install python3-pip

    That will allow you to install python packages using "pip3 install somepackage".

    Now install some dev tools:
    sudo apt install build-essential libssl-dev libffi-dev python3-dev

    Install python's virtual environment creator:
    sudo apt install python3-venv


    Now, create a directory which will hold all of your python projects. I called mine
    ~/Documents/PythonProjects

    cd into PythonProjects (or what ever you named yours) and issue:
    python3 -m venv firstproject (or what ever you named it)

    Under PythonProjects you can continue to create other environments. Each environment is actually its own directory, using the name you gave it, under PythonProjects (or what ever name you made it)


    To activate a virtual environment, from PythonProjects issue:
    source firstproject/bin/activate

    The prompt will immediately change to (in my case):
    (pythonpractice) jerry@jerryAspire-V3-771:~/Documents/PythonProjects$

    showing that I am in my pythonpractice environment. From that prompt I can start python:
    (pythonpractice) jerry@jerryAspire-V3-771:~/Documents/PythonProjects$ python
    Python 3.8.5 (default, Jul 28 2020, 12:59:40)
    [GCC 9.3.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>>

    I am now in the pythonpractice subdirectory running Python in the interactive mode. Inside the PythonProjects directory I could use "python3 -m venv secondproject" to create another subdirectory of PythonProjects called secondproject. Using "source secondproject/bin/activate" I could then work in a second project simultaneously without fear of messing up my pythonpractice environment or having it mess up my secondproject environment.

    To leave the interactive mode use Ctl+D or "quit()". To leave a virtual environment use "deactivate".
    Your normal prompt will return.

    While in a python environment you can install IDE's or other libraries or tools and run them from there. The repository has the spyder3 Python IDE, version 3.8. Once you install it you can use pip3 to install spider=4.1.5, which is what I have running. Inside my pythonpractice environment I typed "spyder3" (even though I am running version 4):

    (pythonpractice) jerry@jerryAspire-V3-771:~/Documents/PythonProjects$ spyder3
    <spyder.otherplugins._ModuleMock object at 0x7fac88846670>: 'bool' object is not callable
    Traceback (most recent call last):
    File "/usr/local/lib/python3.8/dist-packages/spyder/app/mainwindow.py", line 995, in setup
    plugin = mod.PLUGIN_CLASS(self)
    TypeError: 'bool' object is not callable

    This error occurs inside an environment or out, and probably when called from the application menu. Even though a "bool" object error was listed in the console spyder3 ran normally as far as I could tell. If I run into a problem I'll post it in this thread.

    A word of caution. When I typed "python" in a Konsole I get
    Code:
    $ python
    
    Command 'python' not found, did you mean:
    
      command 'python3' from deb python3
      command 'python' from deb python-is-python3
    But, inside a virtual environment "python" is assigned to the version used to create the virtual environment.

    I decided to configure python to allow me to choose the default version so that when I typed "python -V" it responded with the correct version and number. I am not going to explain how I did that, instructions are easily available on the web, but in doing so it broke spyder3, which no longer would fire, and worse, it broke apt and muon, preventing me from adding or removing packages because "only root can do that". When I logged into root and ran either again, I still got the same message. Fortunately it took only a couple minutes to roll back to before the modification.
    Last edited by GreyGeek; Nov 05, 2020, 11:49 AM.
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    #2
    Earlier this week, whilst browsing round the net looking for something to do, I started an online course in python programming on the edx.org site. I've not learnt a programming language before, so something new. I set up an environment as above and use Kate with the embedded Konsole to write and test what I am doing.

    Comment


      #3
      If, while in an environment, you do
      pip3 list
      you'll get something like:
      pip3 list
      Code:
      Package       Version
      ------------- -------
      pip           20.0.2 
      pkg-resources 0.0.0  
      setuptools    44.0.0
      and, at this point in a new environment, if you do
      pip freeze
      it will return nothing, showing that you haven't added libraries or packages to your environment.
      You can install requests
      pip install requests
      pip list
      [code
      pip list
      Package Version
      ------------- ---------
      certifi 2020.6.20
      chardet 3.0.4
      idna 2.10
      pip 20.0.2
      pkg-resources 0.0.0
      requests 2.24.0
      setuptools 44.0.0
      urllib3 1.25.11
      [/code]
      Now if you do
      pip freeze
      You will get
      Code:
      certifi==2020.6.20
      chardet==3.0.4
      idna==2.10
      requests==2.24.0
      urllib3==1.25.11
      If you do
      pip freeze > requirements.txt
      you will save a list of your packages, libraries and such as a text file which can be copied to another environment and installed using
      pip install -r requirements.txt
      which will install the packages listed in it to the new environment.


      If you do "pip3 list" from a terminal (not an env) you will get a list of packages and libraries and such that are visible to python3. However, those packages are not in an environment that you create. You can add them during the creation of an environment using
      python3 -m venv yourvenvname --system-site-packages


      Here is a YT video explaining setting up a python environment.
      Last edited by GreyGeek; Nov 06, 2020, 01:42 PM.
      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
      – John F. Kennedy, February 26, 1962.

      Comment


        #4
        If you want a good IDE, I use the one from here --> https://wingware.com/

        Comment


          #5
          Interesting, but Wing Personal and Wing 101 have limited or no support with regard to science tools I need.

          And, I wouldn't be using it long enough to justify buying the pro version that has the tools I want.

          I checked out PyCharm too, but it isn't any better. It's available only on the snap store, otherwise you have to DL the tar file and install it. I did install it to check it out, but I'm going to remove it and return to Spyder3.

          Spyder3 is open source and is in the repository. It has some minor problems, especially trying to get it to run inside a venv, which doesn't seem to hurt the IDE or python, but it has ALL the scientific, math, graph and database tools that I need. The latest version is 4.1.5. I installed it using "pip install -U spyder==4.1.5" and it ran well but messed up pythin3 and apt, so I purged it.

          After I remove PyCharm I am going to reinstall Spyder3.
          Last edited by GreyGeek; Nov 06, 2020, 04:43 PM.
          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
          – John F. Kennedy, February 26, 1962.

          Comment


            #6
            After playing around with spyder3 (and 4) and having no success at getting it to autocomplete methods part of some objects, like a pandas db, I decided to install Anaconda3 Individual (the free open source version). Much better.

            The only problem I had was firing up jupyter-notebook and having it automatically start my browser. So, I added the ip address to the command
            jupyter-notebook --ip=127.0.0.1
            and it presented two links related to 127.0.0.1 and one related to "file:///..."
            All three when entered into the URL brought up the jupyter notebook. Pandas db's showed their methods and properties properly and worked nicely. I am going to delete spyder3 because Anaconda3 supplies its own spyder, which I haven't tried yet and may not. All in all, VERY NEAT!

            Jupyter-notebook in Anaconda looks and works identically to Jupyter-notebook in SageMath, which I've removed from my system.
            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
            – John F. Kennedy, February 26, 1962.

            Comment


              #7
              @GreyGeek;

              So, your comment on Jupyter Notebook caught my eye. Never heard of it. Read a quick byte about it --> data cleaning and transformation.

              So is that like data mapping from one system to another? Also, being able to search a text stream and clean any data format/configuration issues?

              Reason I ask is I do some EDI for the company I'm with and we have issues from time to time with our customers and the EDI they send us being inconsistent. Currently do a lot of BASH commands (AWK, SED, and the like). Does well, but would like to integrate all to Python, if possible.

              Comment


                #8
                I'll post more tomorrow but yes, with pandas data manipulation is really easy.
                There are some excellent videos on YT by the "Python Programmer" that illustrates data science.
                He's a physicist in England
                You'll be amazed at what you can do without sed, grep, awk, etc.
                Last edited by GreyGeek; Nov 09, 2020, 08:33 PM.
                "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                – John F. Kennedy, February 26, 1962.

                Comment


                  #9
                  Here is a video from "Python Programmer" which illustrates how Jupyter-notebook works. He download's WHO's covid data base and while dissecting it explains various features of pandas


                  I repeated his coding in my own jupyter-notebook and it works great!
                  He is saving me hours of time using traditional methods to obtain, cull and merge data to analyze it.
                  Last edited by GreyGeek; Nov 09, 2020, 11:26 AM.
                  "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                  – John F. Kennedy, February 26, 1962.

                  Comment


                    #10
                    Thanks!

                    Watching now.

                    Comment


                      #11
                      I got interested in using Tensor Analysis in Anaconda and in the process saw this video:
                      https://deeplearning.mit.edu/

                      In that video the speaker mentioned that PyTorch is overtaking Tensor Analysis, so I went to its GitHub site and followed the installation directions. The installation instructions and the output from the process is shown below. The installation went without a hitch.
                      Code:
                      [FONT=monospace][COLOR=#54ff54][B]jerry@jerryAspire-V3-771[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454ff][B]~[/B][/COLOR][COLOR=#000000]$ cd Documents/PythonProjects/ [/COLOR]
                      [COLOR=#54ff54][B]jerry@jerryAspire-V3-771[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454ff][B]~/Documents/PythonProjects[/B][/COLOR][COLOR=#000000]$ conda activate base [/COLOR]
                      (base) [COLOR=#54ff54][B]jerry@jerryAspire-V3-771[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454ff][B]~/Documents/PythonProjects[/B][/COLOR][COLOR=#000000]$ conda install --name base pytorch [/COLOR]
                      Collecting package metadata (current_repodata.json): done 
                      Solving environment: done 
                      
                      ## Package Plan ## 
                      
                        environment location: /home/jerry/anaconda3 
                      
                        added / updated specs: 
                          - pytorch 
                      
                      
                      The following packages will be downloaded: 
                      
                          package                    |            build 
                          ---------------------------|----------------- 
                          _pytorch_select-0.1        |            cpu_0           3 KB 
                          ca-certificates-2021.1.19  |       h06a4308_1         118 KB 
                          intel-openmp-2019.4        |              243         729 KB 
                          libmklml-2019.0.5          |                0        22.3 MB 
                          ninja-1.10.2               |   py38hff7bd54_0         1.4 MB 
                          pytorch-1.7.1              |cpu_py38h6a09485_0        31.7 MB 
                          ------------------------------------------------------------ 
                                                                 Total:        56.3 MB 
                      
                      The following NEW packages will be INSTALLED: 
                      
                        _pytorch_select    pkgs/main/linux-64::_pytorch_select-0.1-cpu_0 
                        libmklml           pkgs/main/linux-64::libmklml-2019.0.5-0 
                        ninja              pkgs/main/linux-64::ninja-1.10.2-py38hff7bd54_0 
                        pytorch            pkgs/main/linux-64::pytorch-1.7.1-cpu_py38h6a09485_0 
                      
                      The following packages will be UPDATED: 
                      
                        ca-certificates                      2021.1.19-h06a4308_0 --> 2021.1.19-h06a4308_1 
                      
                      The following packages will be DOWNGRADED: 
                      
                        intel-openmp                                   2020.2-254 --> 2019.4-243 
                      
                      
                      Proceed ([y]/n)? y 
                      
                      
                      Downloading and Extracting Packages 
                      ca-certificates-2021 | 118 KB    | ##################################################  ################################ | 100%  
                      libmklml-2019.0.5    | 22.3 MB   | ##################################################  ################################ | 100%  
                      intel-openmp-2019.4  | 729 KB    | ##################################################  ################################ | 100%  
                      pytorch-1.7.1        | 31.7 MB   | ##################################################  ################################ | 100%  
                      _pytorch_select-0.1  | 3 KB      | ##################################################  ################################ | 100%  
                      ninja-1.10.2         | 1.4 MB    | ##################################################  ################################ | 100%  
                      Preparing transaction: done 
                      Verifying transaction: done 
                      Executing transaction: done 
                      [/FONT]

                      That went swimmingly so I proceeded to install "stable baselines"

                      Code:
                      (base) [COLOR=#54ff54][B]jerry@jerryAspire-V3-771[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454ff][B]~/Documents/PythonProjects[/B][/COLOR][COLOR=#000000]$ conda install --name base 'stable baselines' [/COLOR]
                      Collecting package metadata (current_repodata.json): done 
                      Solving environment: failed with initial frozen solve. Retrying with flexible solve. 
                      Collecting package metadata (repodata.json): done 
                      Solving environment: failed with initial frozen solve. Retrying with flexible solve. 
                      
                      PackagesNotFoundError: The following packages are not available from current channels: 
                      
                        - stable==baselines 
                      
                      Current channels: 
                      
                        - [URL]https://repo.anaconda.com/pkgs/main/linux-64[/URL] 
                        - [URL]https://repo.anaconda.com/pkgs/main/noarch[/URL] 
                        - [URL]https://repo.anaconda.com/pkgs/r/linux-64[/URL] 
                        - [URL]https://repo.anaconda.com/pkgs/r/noarch[/URL] 
                      
                      To search for alternate channels that may provide the conda package you're 
                      looking for, navigate to 
                      
                          [URL]https://anaconda.org[/URL] 
                      
                      and use the search bar at the top of the page.
                      Opps!

                      That didn't work out so I went to the PyTorch GitHub website. I had guessed the wrong name and needed some dependencies.

                      Code:
                      (base) [COLOR=#54ff54][B]jerry@jerryAspire-V3-771[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454ff][B]~/Documents/PythonProjects[/B][/COLOR][COLOR=#000000]$ sudo apt-get update && sudo apt-get install cmake libopenmpi-dev [/COLOR]
                      python3-dev zlib1g-dev 
                      [sudo] password for jerry:  
                      Get:1 [URL]http://security.ubuntu.com/ubuntu[/URL] focal-security InRelease [109 kB] 
                      Hit:2 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal InRelease                                                                    
                      Get:3 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal-updates InRelease [114 kB]                                                   
                      Hit:4 [URL]http://ppa.launchpad.net/mkusb/ppa/ubuntu[/URL] focal InRelease                                                              
                      Get:5 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal-backports InRelease [101 kB]                                                 
                      Hit:6 [URL]https://updates.signal.org/desktop/apt[/URL] xenial InRelease                                                                
                      Hit:7 [URL]https://linux.teamviewer.com/deb[/URL] stable InRelease                                                                      
                      Hit:8 [URL]http://ppa.launchpad.net/utappia/stable/ubuntu[/URL] focal InRelease                                                         
                      Hit:9 [URL]http://archive.canonical.com/ubuntu[/URL] focal InRelease                               
                      Get:10 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal-updates/main amd64 Packages [842 kB] 
                      Get:11 [URL]http://security.ubuntu.com/ubuntu[/URL] focal-security/main i386 Packages [198 kB] 
                      Get:12 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal-updates/main i386 Packages [434 kB] 
                      Get:13 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal-updates/main Translation-en [201 kB]       
                      Get:14 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal-updates/main amd64 DEP-11 Metadata [264 kB]      
                      Get:15 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal-updates/main amd64 c-n-f Metadata [12.8 kB]         
                      Get:16 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal-updates/universe amd64 Packages [747 kB]          
                      Get:17 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal-updates/universe i386 Packages [555 kB]         
                      Get:18 [URL]http://security.ubuntu.com/ubuntu[/URL] focal-security/main amd64 Packages [524 kB]     
                      Get:19 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal-updates/universe Translation-en [155 kB]  
                      Get:20 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal-updates/universe amd64 DEP-11 Metadata [302 kB]  
                      Get:21 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal-updates/universe amd64 c-n-f Metadata [16.2 kB]    
                      Get:22 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal-updates/multiverse amd64 DEP-11 Metadata [2,468 B] 
                      Get:23 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal-backports/universe amd64 DEP-11 Metadata [1,768 B]    
                      Get:24 [URL]http://security.ubuntu.com/ubuntu[/URL] focal-security/main Translation-en [113 kB]                   
                      Get:25 [URL]http://security.ubuntu.com/ubuntu[/URL] focal-security/main amd64 DEP-11 Metadata [24.3 kB] 
                      Get:26 [URL]http://security.ubuntu.com/ubuntu[/URL] focal-security/main amd64 c-n-f Metadata [7,172 B] 
                      Get:27 [URL]http://security.ubuntu.com/ubuntu[/URL] focal-security/universe i386 Packages [428 kB] 
                      Get:28 [URL]http://security.ubuntu.com/ubuntu[/URL] focal-security/universe amd64 Packages [542 kB] 
                      Get:29 [URL]http://security.ubuntu.com/ubuntu[/URL] focal-security/universe Translation-en [78.1 kB] 
                      Get:30 [URL]http://security.ubuntu.com/ubuntu[/URL] focal-security/universe amd64 DEP-11 Metadata [58.2 kB] 
                      Get:31 [URL]http://security.ubuntu.com/ubuntu[/URL] focal-security/universe amd64 c-n-f Metadata [10.5 kB] 
                      Fetched 5,842 kB in 2s (3,030 kB/s)                                  
                      Reading package lists... Done 
                      Reading package lists... Done 
                      Building dependency tree        
                      Reading state information... Done 
                      cmake is already the newest version (3.16.3-1ubuntu1). 
                      python3-dev is already the newest version (3.8.2-0ubuntu2). 
                      zlib1g-dev is already the newest version (1:1.2.11.dfsg-2ubuntu1.2). 
                      zlib1g-dev set to manually installed. 
                      The following additional packages will be installed: 
                        autoconf automake autotools-dev cpp-8 gcc-8 gcc-8-base gfortran gfortran-8 gfortran-9 ibverbs-providers libcaf-openmpi-3 
                        libcoarrays-dev libcoarrays-openmpi-dev libevent-core-2.1-7 libevent-dev libevent-extra-2.1-7 libevent-openssl-2.1-7 
                        libevent-pthreads-2.1-7 libfabric1 libgcc-8-dev libgfortran-8-dev libgfortran-9-dev libhwloc-dev libhwloc-plugins 
                        libhwloc15 libibverbs-dev libibverbs1 libltdl-dev libmpx2 libnl-3-dev libnl-route-3-dev libnuma-dev libopenmpi3 libpmix2 
                        libpsm-infinipath1 libpsm2-2 librdmacm1 libtool m4 openmpi-bin openmpi-common 
                      Suggested packages: 
                        autoconf-archive gnu-standards autoconf-doc gettext gcc-8-locales gcc-8-multilib gcc-8-doc gfortran-multilib gfortran-doc 
                        gfortran-8-multilib gfortran-8-doc gfortran-9-multilib gfortran-9-doc libhwloc-contrib-plugins libtool-doc openmpi-doc 
                        gcj-jdk m4-doc 
                      The following NEW packages will be installed: 
                        autoconf automake autotools-dev cpp-8 gcc-8 gcc-8-base gfortran gfortran-8 gfortran-9 ibverbs-providers libcaf-openmpi-3 
                        libcoarrays-dev libcoarrays-openmpi-dev libevent-core-2.1-7 libevent-dev libevent-extra-2.1-7 libevent-openssl-2.1-7 
                        libevent-pthreads-2.1-7 libfabric1 libgcc-8-dev libgfortran-8-dev libgfortran-9-dev libhwloc-dev libhwloc-plugins 
                        libhwloc15 libibverbs-dev libibverbs1 libltdl-dev libmpx2 libnl-3-dev libnl-route-3-dev libnuma-dev libopenmpi-dev 
                        libopenmpi3 libpmix2 libpsm-infinipath1 libpsm2-2 librdmacm1 libtool m4 openmpi-bin openmpi-common 
                      0 upgraded, 42 newly installed, 0 to remove and 8 not upgraded. 
                      Need to get 47.3 MB of archives. 
                      After this operation, 168 MB of additional disk space will be used. 
                      Do you want to continue? [Y/n]  
                      Get:1 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/main amd64 m4 amd64 1.4.18-4 [199 kB] 
                      Get:2 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/main amd64 autoconf all 2.69-11.1 [321 kB] 
                      Get:3 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/main amd64 autotools-dev all 20180224.1 [39.6 kB] 
                      Get:4 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/main amd64 automake all 1:1.16.1-4ubuntu6 [522 kB] 
                      Get:5 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/universe amd64 gcc-8-base amd64 8.4.0-3ubuntu2 [18.7 kB] 
                      Get:6 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/universe amd64 cpp-8 amd64 8.4.0-3ubuntu2 [8,945 kB] 
                      Get:7 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/universe amd64 libmpx2 amd64 8.4.0-3ubuntu2 [11.8 kB] 
                      Get:8 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/universe amd64 libgcc-8-dev amd64 8.4.0-3ubuntu2 [2,313 kB] 
                      Get:9 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/universe amd64 gcc-8 amd64 8.4.0-3ubuntu2 [9,833 kB] 
                      Get:10 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal-updates/main amd64 libgfortran-9-dev amd64 9.3.0-17ubuntu1~20.04 [684 kB] 
                      Get:11 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal-updates/main amd64 gfortran-9 amd64 9.3.0-17ubuntu1~20.04 [7,921 kB] 
                      Get:12 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/main amd64 gfortran amd64 4:9.3.0-1ubuntu2 [1,372 B] 
                      Get:13 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/universe amd64 libgfortran-8-dev amd64 8.4.0-3ubuntu2 [625 kB] 
                      Get:14 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/universe amd64 gfortran-8 amd64 8.4.0-3ubuntu2 [9,424 kB] 
                      Get:15 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/main amd64 libibverbs1 amd64 28.0-1ubuntu1 [53.6 kB] 
                      Get:16 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/main amd64 ibverbs-providers amd64 28.0-1ubuntu1 [232 kB] 
                      Get:17 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/main amd64 libevent-core-2.1-7 amd64 2.1.11-stable-1 [89.1 kB] 
                      Get:18 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/main amd64 libevent-pthreads-2.1-7 amd64 2.1.11-stable-1 [7,372 B] 
                      Get:19 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/universe amd64 libpsm-infinipath1 amd64 3.3+20.604758e7-6 [168 kB] 
                      Get:20 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/universe amd64 libpsm2-2 amd64 11.2.86-1 [178 kB] 
                      Get:21 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/main amd64 librdmacm1 amd64 28.0-1ubuntu1 [64.9 kB] 
                      Get:22 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/universe amd64 libfabric1 amd64 1.6.2-3 [396 kB] 
                      Get:23 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/universe amd64 libhwloc15 amd64 2.1.0+dfsg-4 [134 kB] 
                      Get:24 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/universe amd64 libhwloc-plugins amd64 2.1.0+dfsg-4 [14.4 kB] 
                      Get:25 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/universe amd64 libpmix2 amd64 3.1.5-1 [442 kB] 
                      Get:26 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/universe amd64 libopenmpi3 amd64 4.0.3-0ubuntu1 [1,978 kB] 
                      Get:27 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/universe amd64 libcaf-openmpi-3 amd64 2.8.0-1 [35.5 kB] 
                      Get:28 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/universe amd64 libcoarrays-dev amd64 2.8.0-1 [28.2 kB] 
                      Get:29 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/universe amd64 openmpi-common all 4.0.3-0ubuntu1 [151 kB] 
                      Get:30 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/universe amd64 openmpi-bin amd64 4.0.3-0ubuntu1 [67.4 kB] 
                      Get:31 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/universe amd64 libcoarrays-openmpi-dev amd64 2.8.0-1 [34.2 kB] 
                      Get:32 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/main amd64 libevent-extra-2.1-7 amd64 2.1.11-stable-1 [60.0 kB] 
                      Get:33 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/main amd64 libevent-openssl-2.1-7 amd64 2.1.11-stable-1 [14.3 kB] 
                      Get:34 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/main amd64 libevent-dev amd64 2.1.11-stable-1 [261 kB] 
                      Get:35 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/main amd64 libltdl-dev amd64 2.4.6-14 [162 kB] 
                      Get:36 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/main amd64 libnl-3-dev amd64 3.4.0-1 [92.2 kB] 
                      Get:37 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/main amd64 libnl-route-3-dev amd64 3.4.0-1 [166 kB] 
                      Get:38 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/main amd64 libtool all 2.4.6-14 [161 kB] 
                      Get:39 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/main amd64 libnuma-dev amd64 2.0.12-1 [32.4 kB] 
                      Get:40 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/universe amd64 libhwloc-dev amd64 2.1.0+dfsg-4 [205 kB] 
                      Get:41 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/main amd64 libibverbs-dev amd64 28.0-1ubuntu1 [444 kB] 
                      Get:42 [URL]http://us.archive.ubuntu.com/ubuntu[/URL] focal/universe amd64 libopenmpi-dev amd64 4.0.3-0ubuntu1 [798 kB] 
                      Fetched 47.3 MB in 6s (8,116 kB/s)        
                      Extracting templates from packages: 100% 
                      Selecting previously unselected package m4. 
                      (Reading database ... 412940 files and directories currently installed.) 
                      Preparing to unpack .../00-m4_1.4.18-4_amd64.deb ... 
                      Unpacking m4 (1.4.18-4) ... 
                      Selecting previously unselected package autoconf. 
                      Preparing to unpack .../01-autoconf_2.69-11.1_all.deb ... 
                      Unpacking autoconf (2.69-11.1) ... 
                      Selecting previously unselected package autotools-dev. 
                      Preparing to unpack .../02-autotools-dev_20180224.1_all.deb ... 
                      Unpacking autotools-dev (20180224.1) ... 
                      Selecting previously unselected package automake. 
                      Preparing to unpack .../03-automake_1%3a1.16.1-4ubuntu6_all.deb ... 
                      Unpacking automake (1:1.16.1-4ubuntu6) ... 
                      Selecting previously unselected package gcc-8-base:amd64. 
                      Preparing to unpack .../04-gcc-8-base_8.4.0-3ubuntu2_amd64.deb ... 
                      Unpacking gcc-8-base:amd64 (8.4.0-3ubuntu2) ... 
                      Selecting previously unselected package cpp-8. 
                      Preparing to unpack .../05-cpp-8_8.4.0-3ubuntu2_amd64.deb ... 
                      Unpacking cpp-8 (8.4.0-3ubuntu2) ... 
                      Selecting previously unselected package libmpx2:amd64. 
                      Preparing to unpack .../06-libmpx2_8.4.0-3ubuntu2_amd64.deb ... 
                      Unpacking libmpx2:amd64 (8.4.0-3ubuntu2) ... 
                      Selecting previously unselected package libgcc-8-dev:amd64. 
                      Preparing to unpack .../07-libgcc-8-dev_8.4.0-3ubuntu2_amd64.deb ... 
                      Unpacking libgcc-8-dev:amd64 (8.4.0-3ubuntu2) ... 
                      Selecting previously unselected package gcc-8. 
                      Preparing to unpack .../08-gcc-8_8.4.0-3ubuntu2_amd64.deb ... 
                      Unpacking gcc-8 (8.4.0-3ubuntu2) ... 
                      Selecting previously unselected package libgfortran-9-dev:amd64. 
                      Preparing to unpack .../09-libgfortran-9-dev_9.3.0-17ubuntu1~20.04_amd64.deb ... 
                      Unpacking libgfortran-9-dev:amd64 (9.3.0-17ubuntu1~20.04) ... 
                      Selecting previously unselected package gfortran-9. 
                      Preparing to unpack .../10-gfortran-9_9.3.0-17ubuntu1~20.04_amd64.deb ... 
                      Unpacking gfortran-9 (9.3.0-17ubuntu1~20.04) ... 
                      Selecting previously unselected package gfortran. 
                      Preparing to unpack .../11-gfortran_4%3a9.3.0-1ubuntu2_amd64.deb ... 
                      Unpacking gfortran (4:9.3.0-1ubuntu2) ... 
                      Selecting previously unselected package libgfortran-8-dev:amd64. 
                      Preparing to unpack .../12-libgfortran-8-dev_8.4.0-3ubuntu2_amd64.deb ... 
                      Unpacking libgfortran-8-dev:amd64 (8.4.0-3ubuntu2) ... 
                      Selecting previously unselected package gfortran-8. 
                      Preparing to unpack .../13-gfortran-8_8.4.0-3ubuntu2_amd64.deb ... 
                      Unpacking gfortran-8 (8.4.0-3ubuntu2) ... 
                      Selecting previously unselected package libibverbs1:amd64. 
                      Preparing to unpack .../14-libibverbs1_28.0-1ubuntu1_amd64.deb ... 
                      Unpacking libibverbs1:amd64 (28.0-1ubuntu1) ... 
                      Selecting previously unselected package ibverbs-providers:amd64. 
                      Preparing to unpack .../15-ibverbs-providers_28.0-1ubuntu1_amd64.deb ... 
                      Unpacking ibverbs-providers:amd64 (28.0-1ubuntu1) ... 
                      Selecting previously unselected package libevent-core-2.1-7:amd64. 
                      Preparing to unpack .../16-libevent-core-2.1-7_2.1.11-stable-1_amd64.deb ... 
                      Unpacking libevent-core-2.1-7:amd64 (2.1.11-stable-1) ... 
                      Selecting previously unselected package libevent-pthreads-2.1-7:amd64. 
                      Preparing to unpack .../17-libevent-pthreads-2.1-7_2.1.11-stable-1_amd64.deb ... 
                      Unpacking libevent-pthreads-2.1-7:amd64 (2.1.11-stable-1) ... 
                      Selecting previously unselected package libpsm-infinipath1. 
                      Preparing to unpack .../18-libpsm-infinipath1_3.3+20.604758e7-6_amd64.deb ... 
                      Unpacking libpsm-infinipath1 (3.3+20.604758e7-6) ... 
                      Selecting previously unselected package libpsm2-2. 
                      Preparing to unpack .../19-libpsm2-2_11.2.86-1_amd64.deb ... 
                      Unpacking libpsm2-2 (11.2.86-1) ... 
                      Selecting previously unselected package librdmacm1:amd64. 
                      Preparing to unpack .../20-librdmacm1_28.0-1ubuntu1_amd64.deb ... 
                      Unpacking librdmacm1:amd64 (28.0-1ubuntu1) ... 
                      Selecting previously unselected package libfabric1. 
                      Preparing to unpack .../21-libfabric1_1.6.2-3_amd64.deb ... 
                      Unpacking libfabric1 (1.6.2-3) ... 
                      Selecting previously unselected package libhwloc15:amd64. 
                      Preparing to unpack .../22-libhwloc15_2.1.0+dfsg-4_amd64.deb ... 
                      Unpacking libhwloc15:amd64 (2.1.0+dfsg-4) ... 
                      Selecting previously unselected package libhwloc-plugins:amd64. 
                      Preparing to unpack .../23-libhwloc-plugins_2.1.0+dfsg-4_amd64.deb ... 
                      Unpacking libhwloc-plugins:amd64 (2.1.0+dfsg-4) ... 
                      Selecting previously unselected package libpmix2:amd64. 
                      Preparing to unpack .../24-libpmix2_3.1.5-1_amd64.deb ... 
                      Unpacking libpmix2:amd64 (3.1.5-1) ... 
                      Selecting previously unselected package libopenmpi3:amd64. 
                      Preparing to unpack .../25-libopenmpi3_4.0.3-0ubuntu1_amd64.deb ... 
                      Unpacking libopenmpi3:amd64 (4.0.3-0ubuntu1) ... 
                      Selecting previously unselected package libcaf-openmpi-3:amd64. 
                      Preparing to unpack .../26-libcaf-openmpi-3_2.8.0-1_amd64.deb ... 
                      Unpacking libcaf-openmpi-3:amd64 (2.8.0-1) ... 
                      Selecting previously unselected package libcoarrays-dev:amd64. 
                      Preparing to unpack .../27-libcoarrays-dev_2.8.0-1_amd64.deb ... 
                      Unpacking libcoarrays-dev:amd64 (2.8.0-1) ... 
                      Selecting previously unselected package openmpi-common. 
                      Preparing to unpack .../28-openmpi-common_4.0.3-0ubuntu1_all.deb ... 
                      Unpacking openmpi-common (4.0.3-0ubuntu1) ... 
                      Selecting previously unselected package openmpi-bin. 
                      Preparing to unpack .../29-openmpi-bin_4.0.3-0ubuntu1_amd64.deb ... 
                      Unpacking openmpi-bin (4.0.3-0ubuntu1) ... 
                      Selecting previously unselected package libcoarrays-openmpi-dev:amd64. 
                      Preparing to unpack .../30-libcoarrays-openmpi-dev_2.8.0-1_amd64.deb ... 
                      Unpacking libcoarrays-openmpi-dev:amd64 (2.8.0-1) ... 
                      Selecting previously unselected package libevent-extra-2.1-7:amd64. 
                      Preparing to unpack .../31-libevent-extra-2.1-7_2.1.11-stable-1_amd64.deb ... 
                      Unpacking libevent-extra-2.1-7:amd64 (2.1.11-stable-1) ... 
                      Selecting previously unselected package libevent-openssl-2.1-7:amd64. 
                      Preparing to unpack .../32-libevent-openssl-2.1-7_2.1.11-stable-1_amd64.deb ... 
                      Unpacking libevent-openssl-2.1-7:amd64 (2.1.11-stable-1) ... 
                      Selecting previously unselected package libevent-dev. 
                      Preparing to unpack .../33-libevent-dev_2.1.11-stable-1_amd64.deb ... 
                      Unpacking libevent-dev (2.1.11-stable-1) ... 
                      Selecting previously unselected package libltdl-dev:amd64. 
                      Preparing to unpack .../34-libltdl-dev_2.4.6-14_amd64.deb ... 
                      Unpacking libltdl-dev:amd64 (2.4.6-14) ... 
                      Selecting previously unselected package libnl-3-dev:amd64. 
                      Preparing to unpack .../35-libnl-3-dev_3.4.0-1_amd64.deb ... 
                      Unpacking libnl-3-dev:amd64 (3.4.0-1) ... 
                      Selecting previously unselected package libnl-route-3-dev:amd64. 
                      Preparing to unpack .../36-libnl-route-3-dev_3.4.0-1_amd64.deb ... 
                      Unpacking libnl-route-3-dev:amd64 (3.4.0-1) ... 
                      Selecting previously unselected package libtool. 
                      Preparing to unpack .../37-libtool_2.4.6-14_all.deb ... 
                      Unpacking libtool (2.4.6-14) ... 
                      Selecting previously unselected package libnuma-dev:amd64. 
                      Preparing to unpack .../38-libnuma-dev_2.0.12-1_amd64.deb ... 
                      Unpacking libnuma-dev:amd64 (2.0.12-1) ... 
                      Selecting previously unselected package libhwloc-dev:amd64. 
                      Preparing to unpack .../39-libhwloc-dev_2.1.0+dfsg-4_amd64.deb ... 
                      Unpacking libhwloc-dev:amd64 (2.1.0+dfsg-4) ... 
                      Selecting previously unselected package libibverbs-dev:amd64. 
                      Preparing to unpack .../40-libibverbs-dev_28.0-1ubuntu1_amd64.deb ... 
                      Unpacking libibverbs-dev:amd64 (28.0-1ubuntu1) ... 
                      Selecting previously unselected package libopenmpi-dev:amd64. 
                      Preparing to unpack .../41-libopenmpi-dev_4.0.3-0ubuntu1_amd64.deb ... 
                      Unpacking libopenmpi-dev:amd64 (4.0.3-0ubuntu1) ... 
                      Setting up libibverbs1:amd64 (28.0-1ubuntu1) ... 
                      Setting up ibverbs-providers:amd64 (28.0-1ubuntu1) ... 
                      Setting up libgfortran-9-dev:amd64 (9.3.0-17ubuntu1~20.04) ... 
                      Setting up m4 (1.4.18-4) ... 
                      Setting up libnuma-dev:amd64 (2.0.12-1) ... 
                      Setting up autotools-dev (20180224.1) ... 
                      Setting up libhwloc15:amd64 (2.1.0+dfsg-4) ... 
                      Setting up libevent-core-2.1-7:amd64 (2.1.11-stable-1) ... 
                      Setting up gcc-8-base:amd64 (8.4.0-3ubuntu2) ... 
                      Setting up autoconf (2.69-11.1) ... 
                      Setting up libmpx2:amd64 (8.4.0-3ubuntu2) ... 
                      Setting up libnl-3-dev:amd64 (3.4.0-1) ... 
                      Setting up libpsm2-2 (11.2.86-1) ... 
                      Setting up openmpi-common (4.0.3-0ubuntu1) ... 
                      Setting up libpsm-infinipath1 (3.3+20.604758e7-6) ... 
                      update-alternatives: using /usr/lib/libpsm1/libpsm_infinipath.so.1.16 to provide /usr/lib/x86_64-linux-gnu/libpsm_infinipath.
                      so.1 (libpsm_infinipath.so.1) in auto mode 
                      Setting up cpp-8 (8.4.0-3ubuntu2) ... 
                      Setting up libevent-pthreads-2.1-7:amd64 (2.1.11-stable-1) ... 
                      Setting up automake (1:1.16.1-4ubuntu6) ... 
                      update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode 
                      Setting up librdmacm1:amd64 (28.0-1ubuntu1) ... 
                      Setting up libevent-extra-2.1-7:amd64 (2.1.11-stable-1) ... 
                      Setting up gfortran-9 (9.3.0-17ubuntu1~20.04) ... 
                      Setting up libtool (2.4.6-14) ... 
                      Setting up libevent-openssl-2.1-7:amd64 (2.1.11-stable-1) ... 
                      Setting up libhwloc-plugins:amd64 (2.1.0+dfsg-4) ... 
                      Setting up gfortran (4:9.3.0-1ubuntu2) ... 
                      update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode 
                      update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f77 (f77) in auto mode 
                      Setting up libnl-route-3-dev:amd64 (3.4.0-1) ... 
                      Setting up libltdl-dev:amd64 (2.4.6-14) ... 
                      Setting up libevent-dev (2.1.11-stable-1) ... 
                      Setting up libgcc-8-dev:amd64 (8.4.0-3ubuntu2) ... 
                      Setting up libhwloc-dev:amd64 (2.1.0+dfsg-4) ... 
                      Setting up libfabric1 (1.6.2-3) ... 
                      Setting up libgfortran-8-dev:amd64 (8.4.0-3ubuntu2) ... 
                      Setting up gcc-8 (8.4.0-3ubuntu2) ... 
                      Setting up libpmix2:amd64 (3.1.5-1) ... 
                      Setting up libcoarrays-dev:amd64 (2.8.0-1) ... 
                      Setting up gfortran-8 (8.4.0-3ubuntu2) ... 
                      Setting up libopenmpi3:amd64 (4.0.3-0ubuntu1) ... 
                      Setting up libibverbs-dev:amd64 (28.0-1ubuntu1) ... 
                      Setting up libcaf-openmpi-3:amd64 (2.8.0-1) ... 
                      Setting up openmpi-bin (4.0.3-0ubuntu1) ... 
                      update-alternatives: using /usr/bin/mpirun.openmpi to provide /usr/bin/mpirun (mpirun) in auto mode 
                      update-alternatives: using /usr/bin/mpicc.openmpi to provide /usr/bin/mpicc (mpi) in auto mode 
                      Setting up libcoarrays-openmpi-dev:amd64 (2.8.0-1) ... 
                      Setting up libopenmpi-dev:amd64 (4.0.3-0ubuntu1) ... 
                      update-alternatives: using /usr/lib/x86_64-linux-gnu/openmpi/include to provide /usr/include/x86_64-linux-gnu/mpi (mpi-x86_64
                      -linux-gnu) in auto mode 
                      Processing triggers for libc-bin (2.31-0ubuntu9.2) ... 
                      Processing triggers for man-db (2.9.1-1) ... 
                      Processing triggers for install-info (6.7.0.dfsg.2-5) ...
                      Then I installed stable-baselines[mpi]:
                      Code:
                      (base) [COLOR=#54ff54][B]jerry@jerryAspire-V3-771[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454ff][B]~/Documents/PythonProjects[/B][/COLOR][COLOR=#000000]$ pip3 install stable-baselines[mpi] [/COLOR]
                      Collecting stable-baselines[mpi] 
                        Downloading stable_baselines-2.10.1-py3-none-any.whl (240 kB) 
                           |████████████████████████████████| 240 kB 2.4 MB/s  
                      Collecting opencv-python 
                        Downloading opencv_python-4.5.1.48-cp38-cp38-manylinux2014_x86_64.whl (50.4 MB) 
                           |████████████████████████████████| 50.4 MB 9.3 MB/s  
                      Requirement already satisfied: matplotlib in /home/jerry/.local/lib/python3.8/site-packages (from stable-baselines[mpi]) (3.1
                      .3) 
                      Requirement already satisfied: joblib in /home/jerry/anaconda3/lib/python3.8/site-packages (from stable-baselines[mpi]) (1.0.
                      1) 
                      Requirement already satisfied: numpy in /home/jerry/anaconda3/lib/python3.8/site-packages (from stable-baselines[mpi]) (1.19.
                      2) 
                      Requirement already satisfied: scipy in /home/jerry/anaconda3/lib/python3.8/site-packages (from stable-baselines[mpi]) (1.6.1
                      ) 
                      Requirement already satisfied: pandas in /home/jerry/anaconda3/lib/python3.8/site-packages (from stable-baselines[mpi]) (1.2.
                      3) 
                      Requirement already satisfied: cloudpickle>=0.5.5 in /home/jerry/anaconda3/lib/python3.8/site-packages (from stable-baselines
                      [mpi]) (1.6.0) 
                      Collecting gym[atari,classic_control]>=0.11 
                        Downloading gym-0.18.0.tar.gz (1.6 MB) 
                           |████████████████████████████████| 1.6 MB 9.7 MB/s  
                      Collecting mpi4py 
                        Downloading mpi4py-3.0.3.tar.gz (1.4 MB) 
                           |████████████████████████████████| 1.4 MB 11.0 MB/s  
                      Collecting pyglet<=1.5.0,>=1.4.0 
                        Downloading pyglet-1.5.0-py2.py3-none-any.whl (1.0 MB) 
                           |████████████████████████████████| 1.0 MB 10.4 MB/s  
                      Collecting Pillow<=7.2.0 
                        Downloading Pillow-7.2.0-cp38-cp38-manylinux1_x86_64.whl (2.2 MB) 
                           |████████████████████████████████| 2.2 MB 3.7 MB/s  
                      Collecting atari_py~=0.2.0 
                        Downloading atari-py-0.2.6.tar.gz (790 kB) 
                           |████████████████████████████████| 790 kB 9.8 MB/s  
                      Requirement already satisfied: six in /home/jerry/anaconda3/lib/python3.8/site-packages (from atari_py~=0.2.0->gym[atari,clas
                      sic_control]>=0.11->stable-baselines[mpi]) (1.15.0) 
                      Requirement already satisfied: future in /home/jerry/anaconda3/lib/python3.8/site-packages (from pyglet<=1.5.0,>=1.4.0->gym[a
                      tari,classic_control]>=0.11->stable-baselines[mpi]) (0.18.2) 
                      Requirement already satisfied: cycler>=0.10 in /home/jerry/.local/lib/python3.8/site-packages (from matplotlib->stable-baseli
                      nes[mpi]) (0.10.0) 
                      Requirement already satisfied: kiwisolver>=1.0.1 in /home/jerry/.local/lib/python3.8/site-packages (from matplotlib->stable-b
                      aselines[mpi]) (1.1.0) 
                      Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /home/jerry/anaconda3/lib/python3.8/site-packages 
                      (from matplotlib->stable-baselines[mpi]) (2.4.7) 
                      Requirement already satisfied: python-dateutil>=2.1 in /home/jerry/anaconda3/lib/python3.8/site-packages (from matplotlib->st
                      able-baselines[mpi]) (2.8.1) 
                      Requirement already satisfied: setuptools in /home/jerry/anaconda3/lib/python3.8/site-packages (from kiwisolver>=1.0.1->matpl
                      otlib->stable-baselines[mpi]) (52.0.0.post20210125) 
                      Requirement already satisfied: pytz>=2017.3 in /home/jerry/anaconda3/lib/python3.8/site-packages (from pandas->stable-baselin
                      es[mpi]) (2021.1) 
                      Building wheels for collected packages: gym, atari-py, mpi4py 
                        Building wheel for gym (setup.py) ... done 
                        Created wheel for gym: filename=gym-0.18.0-py3-none-any.whl size=1656449 sha256=4e7e53cbeede50608f438077e710056c91c4f3e3d24
                      410224072af2fc4d0e3d5 
                        Stored in directory: /home/jerry/.cache/pip/wheels/d8/e7/68/a3f0f1b5831c9321d7523f6fd4e0d3f83f2705a1cbd5daaa79 
                        Building wheel for atari-py (setup.py) ... done 
                        Created wheel for atari-py: filename=atari_py-0.2.6-cp38-cp38-linux_x86_64.whl size=2844519 sha256=0a94be5832b4bd02f8ab3707
                      6ed0f2610ca3b6c05c3f440eb1a89e28e3538d4c 
                        Stored in directory: /home/jerry/.cache/pip/wheels/7f/5e/27/2e90b9887063d82ee2f9f8b2f8db76bb2290aa281dc40449c8 
                        Building wheel for mpi4py (setup.py) ... done 
                        Created wheel for mpi4py: filename=mpi4py-3.0.3-cp38-cp38-linux_x86_64.whl size=745980 sha256=0769ac15f0a700153dd842aad0b57
                      988e3322fa8a7d1ae61489020f9101ef042 
                        Stored in directory: /home/jerry/.cache/pip/wheels/ff/61/0c/c516bd6b85f61f0acf333b0fbf5102fe39928a3563bf245a88 
                      Successfully built gym atari-py mpi4py 
                      Installing collected packages: pyglet, Pillow, opencv-python, gym, atari-py, stable-baselines, mpi4py 
                        Attempting uninstall: Pillow 
                          Found existing installation: Pillow 8.1.1 
                          Uninstalling Pillow-8.1.1: 
                            Successfully uninstalled Pillow-8.1.1 
                      Successfully installed Pillow-7.2.0 atari-py-0.2.6 gym-0.18.0 mpi4py-3.0.3 opencv-python-4.5.1.48 pyglet-1.5.0 stable-baselin
                      es-2.10.1 
                      (base) [COLOR=#54ff54][B]jerry@jerryAspire-V3-771[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454ff][B]~/Documents/PythonProjects[/B][/COLOR][COLOR=#000000]$  [/COLOR]
                      Last edited by GreyGeek; Mar 08, 2021, 04:22 PM.
                      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                      – John F. Kennedy, February 26, 1962.

                      Comment


                        #12
                        Originally posted by GreyGeek View Post
                        ...
                        The only problem I had was firing up jupyter-notebook and having it automatically start my browser. So, I added the ip address to the command
                        jupyter-notebook --ip=127.0.0.1
                        and it presented two links related to 127.0.0.1 and one related to "file:///..."
                        All three when entered into the URL brought up the jupyter notebook. Pandas db's showed their methods and properties properly and worked nicely. I am going to delete spyder3 because Anaconda3 supplies its own spyder, which I haven't tried yet and may not. All in all, VERY NEAT!
                        ...
                        I had been using Waterfox. When FireFox 86 came out I switched to it. As it turned out, using "jupyter-notebook" was all that was necessary to start (or open) FF86 and bring up the Jupyter Notebook GUI.
                        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                        – John F. Kennedy, February 26, 1962.

                        Comment


                          #13
                          AN UPDATE:

                          Somewhere along the road, while using Anaconda, one of the packages I installed under a project environment somehow resulted in anaconda and conda being installed into the base environment, along with about 320 other packages. Clues involved packages from conda-forge being installed. Normally, the base environment initially held about a dozen packages, none of which were conda or anaconda. I created a new environment, basebase, to check if the number of default packages were the same as what the default base environment used to be. It was. Using it as a guide I begin uninstalling packages from base, saving conda and anaconda for last. I got down to 67 packages. After that I could no longer uninstall any other packages because each was dependent on conda or anaconda, and the system would not allow me to uninstall them.

                          I decided to uninstall anaconda. I installed anaconda-clean and then ran it. Then I used rm -rf on the Anaconda3/ directory. I deleted all related hidden directories and files. I edited .bashrc to remove the stanzas in it related to anaconda. I deleted the virtual environments in my projects folder. Then I logged out and back in. I reinstalled anaconda. Checking base I found all 322 packages were somehow loaded back in.

                          Again I repeated all the steps to clean anaconda out of my system. I also search through every file in my account AND root for the term "conda" and proceeded to eliminate those files as well. I also made a BTRFS snapshot of the cleaned system. Then I rebooted and re-installed anaconda. The 322 files reappeared in the base account. I rolled back and began searching for other places that might hold a configuration script, like "requests.txt" and found none. That was it. I decided to abandon anaconda.

                          I returned to using Python3 and installed almost every Python3 package in the repository, including spyder3 and Jupyter QtConsole. I also installed Eric and Idle. I downloaded the appimage for PyCharm. I recreated my virtual environments using "python3 pip -m venv project_env" from inside the project directory. All went well. From a Konsole using "jupyter notebook" I had access to my projects and things worked as expected.

                          I decided to play with the Python IDE's. IMO, Idle and Eric are worthless, so I deleted them. The "free" version of PyCharm is crippled. I deleted it. Using "jupyter notebook" from inside an activated project worked beautifully for doing what I wanted to do, which was interactive investigations of various covid data. Spyder3 worked OK, but it's console output is somewhat limited. But, it is a great IDE if you are not into notebooks.

                          I attempted to upgrade to spyder5 by the usual way: "pip install spyder5". Spyder5 could not be found in any repository or channel to which pip3 had access. I tried another route: "pip3 install --force-reinstall spyder". I thought it would just attempt to update spyder to spyder5. It not only did that, but it appeared to upgrade all the other packages in my project. When it was done I entered "spyder" and Spyder5's logo appeared in all its glory! For autocompletion jedi is not so good. So, I used "bash -c "$(wget -q -O - https://linux.kite.com/dls/linux/current)"", from the Kite website (avoiding the account creation) to install kited. Then I fired up Spyder5 and went into the lint settings and selected Kite instead of jedi. Like teamviewerd, kited is a daemon which runs while your computer is running. IOW, it is a spy. It is added to autostart using: "/home/jerry/.local/share/kite/kited --system-boot", which is not a systemd service. So, if you want to kill it use Ksysguard. To start it use the command used by autostart. Spyder5 is a level above Spyder3. It is, IMO, far and away the best Python3 IDE for free use in Linux.

                          I also experimented with markdown. I installed the markdown packages from the Kubuntu repository, along with several other markdown related packages and ghostwrite, a markdown editor, and I also used pip3 to install markdown from its channel.


                          My goal was to use Jupyter Notebooks to play SageMath Jupyter Notebooks by using nbconvert inside Sage to convert them to py files, which I could pilfer for my current Jupyter Notebook projects. That didn't work out because I uninstalled Sage several months ago, including ~/.sage, where the sage notebooks are stored. Re-installing an archived and depreciated Sage8 to use nbconvert in that tool didn't work, so I browsed the .sage folder until I found the cell folders in which the code and data in my sage cells resided. I copied them manually into my current notebook environment. My Sage notebooks used the "model" package extensively. There are several alternatives in Python3 to solve polynomical curve fitting.

                          So, all in all, I am a happy camper just using Python3 and many of its very nice tools!
                          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                          – John F. Kennedy, February 26, 1962.

                          Comment


                            #14
                            Just revisiting this due to your post. Re-watched that video. Pandas seems very interesting to me. Very powerful it seems within Python itself. Re-watching the video too kind of shows the power of Jupyter. It's more of an interactive session utilizing Python. That is a way of using Programming I never really visualized until now. Paper and Pencil person here to draw out the thought path. So a very much Thank You. I've always stayed within the IDE paradigm of thinking.

                            Comment


                              #15
                              In my limited experience I've found that Jupyter Notebook is a way to rapidly load data, manipulate it and then display it in tables and graphs as output, and save the output to external files. The resulting ipynb file can be exported to a PDF or HTML formatted file, among others. A particular cell in a notebook can be modified and re-run without changing cells above, which is very convenient. Generated graphs are display full-size and can be written to svg or png external files.

                              IDE's like Spyder5, which I have not fully explored and may not understand or may misunderstand the optimum ways it should be used, involves a similar paradigm for loading data and doing the other steps. Your py file has a "main" function which controls the flow of the program, calling other functions residing outside main. A py file does not contain "cells", like a notebook does. Graphs which are built in the code are displayed in, more like squeezed into, a small console "window" within the IDE canvas, or they can be written to an external svg or png file.

                              I've used both Spyder5 and Jupyter Notebook on versions of my primary project and Jupyter is a LOT easier to use. BOTH get their REAL power from the various modules one can import: Pandas, numpy, matplotlib, scipy, scikit-learn, sympy and LOTS of others. For internal documentation in notebooks markdown works nicely and is easy to use. Each of the modules come with help.

                              I've had years of experience using IDE's like Spyder, my favorite being QtCreator, which uses the Qt API. They are great at producing binary executables, static if necessary, for distribution. They are the favorite of client-server applications. Jupyter Notebook running from a Python3 installation with packages from the repository or downloaded by "pip install" from remote channels or repositories, is a LOT easier to setup, configure and run than Sage, Spyder or Qt, IMO.

                              I was happy with SageMath from the first time I used it, down to version 8. It was always local. Version 9 was written for another market, the academic math teacher training students. The students log into his account. As the owner of his account he can silently monitor each student's use of Sage, administer tests, grade them, collect results and report grades, demo examples, assign homework, etc... The repository installation of Python3 (installed automatically in Kubuntu) and all of the Python3 modules in the repository make an excellent foundation. Those modules include Jupyter notebook. All run locally. Sage not needed. Modules in Sage which I needed, like "model()", for curvefitting various exponential and polynomial equations to a data set, are replaced with numpy.polyfit() or skipy.optimize.curve_fit(), and several others.

                              I'm having a blast playing with Python3, pip3 and jupyter notebooks!

                              EDIT: I should add that Spyder3 is in the repository and I couldn't get kite (auto completion tool) to work with it. When I did the "pip install --force-reinstall spyder" command it updated Spyder to ver 5 and when I installed kite it was recognized and works well.
                              Last edited by GreyGeek; Apr 24, 2021, 05:15 PM.
                              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                              – John F. Kennedy, February 26, 1962.

                              Comment

                              Working...
                              X