Skip to content

Install Oasys in Windows 10‐11, step by step

Luca Rebuffi edited this page Jan 9, 2024 · 1 revision

1) Reinstall Miniconda 3

If you tried the automatic script to install Oasys and it failed, remove Miniconda 3 from the system, by deleting the folder:

C:\Users\<user name>\Miniconda3

replacing <user name> with the name of your current user.

Download the Miniconda 3 installer here. Run the executable and install Miniconda 3 in the home folder of your current user:

C:\Users\<user name>\Miniconda3

2) Install OASYS

From the start menu, open the program: "Anaconda Prompt (Miniconda 3)". It will open a command prompt configured to run under the proper Miniconda 3 environment.

Execute the following commands in succession:

pip install pip --upgrade

(note: ignore the error message on access denied/permissions, it's harmless. To be sure, retype the command and see if pip is declared up to date)

conda install -c conda-forge xraylib=4.1.2

(note: this operation will take some minutes)

pip install oasys1 --upgrade

DO NOT leave the Anaconda Prompt.

3) Check OASYS

From the Anaconda prompt execute the following command:

python -m oasys.canvas -l4

Oasys should appear with no add-ons. Close Oasys.

DO NOT leave the Anaconda Prompt.

4) Fix and install Oasys libraries

From the Anaconda prompt execute the following commands in succession:

pip uninstall -y oasys-srwpy

pip install oasys-srwpy --upgrade

pip uninstall -y PyQtWebEngine

pip install PyQtWebEngine==5.14.0

6) Create Oasys Icon

This step is optional, but highly recommended.

Click the right button of the mouse on an empty point of your desktop. Select New -> Shortcut

This for will appear:

Screenshot 2023-05-31 at 10 56 28 AM

In the "location of the item" field type (do not skip the " characters):

"C:\Users\<user name\Miniconda3\Scripts\activate.bat" & python -m oasys.canvas

then click Next, this form will appear:

Screenshot 2023-05-31 at 11 08 00 AM

Name the shortcut: Oasys 1.3

Click Finish.

If you want, an icon is provided in the installation script folder and you can use it for the newly made shortcut.

7) Install Oasys Add-Ons

Double click the Oasys shortcut in the desktop and click the button "Add-Ons" in the initial form and install the required Add-ons.

Known Issues

Recently, the Add-on ShadowOui-Advanced-Tools does not install correctly, since the package retrieved by pip is corrupted.

By using File Explorer, go to the folder Desktop\oasys-installation-scripts\Windows, and double-click the executable fix_addons1.3.bat.

Alternatively, you can open a command prompt and type:

cd Desktop\oasys-installation-scripts\Windows

fix_addons1.3

High DPI displays may cause some problem to run Oasys. The solution is to override high DPI scaling behavior for the python executable of your Miniconda installation:

  1. Right-click C:\Users\<user name>\Miniconda3\python.exe and select "Properties"
  2. In the Compatibility tab, Click "Change high DPI settings"
  3. Check "Override high DPI scaling behavior" and select "System (Enhanced)"
  4. Click Ok and then Ok or Apply.