1.3. Windows Subsystem for Linux (Windows)

This is a real Linux subsystem for you to run OpenSeesPy Linux version on Windows.

1.3.1. Install the Windows Subsystem for Linux

Follow the instruction on here to install Windows Subsystem for Linux on Windows 10. There are a couple of Linux distributions available and Ubuntu is recommended. Once the Linux is installed, it will show as an application in the start menu.

../_images/start.png

1.3.2. Install Anaconda and start Jupyter Notebook

  • Run the subsystem from start menu and a terminal window will show.

    ../_images/wslterminal.png
  • Download Anaconda Linux version with command

    ~$ wget https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh
    
  • Install Anconda Linux version with commands

    ~$ bash Anaconda3-2019.10-Linux-x86_64.sh
    
    >>> Please answer 'yes' or 'no':
    >>> yes
    
    >>> Anaconda3 will not be installed into this location:
    
    [/home/username/anaconda3] >>> (enter)
    
  • Start Jupyter Notebook

    ~$ /home/username/anaconda3/bin/jupyter-notebook
    
  • Copy the address in red box to a web browser

    ../_images/wsljupyter.png ../_images/wsljupyter2.png

1.3.3. In Jupyter Notebook

Start a new notebook and then

../_images/wsljupyter3.png

1.3.4. In the command line (optional)

  • Run Anaconda with following command, where username is your username of your computer. Please use the username shown in last step

    ~$ /home/username/anaconda3/bin/python3.7
    
    ../_images/wslanaconda.png
  • Install or Upgrade OpenSeesPy with commands

    ~$ /home/username/anaconda3/bin/python3.7 -m pip install openseespy
    ~$ /home/username/anaconda3/bin/python3.7 -m pip install --upgrade openseespy
    
    ../_images/wslinstall.png
  • Run OpenSeesPy

    First run Anaconda with

    ~$ /home/username/anaconda3/bin/python3.7
    

    Then import OpenSeesPy with

    import openseespy.opensees as ops
    ops.printModel()
    
    ../_images/wslrun.png
  • run OpenSeesPy scripts

    /home/username/anaconda3/bin/python3.7 script.py