wiki:G2onPy3

Version 7 (modified by toby, 3 years ago) (diff)

--

GSAS-II with Python 3.x

GSAS-II has been packaged with Python 3.6, wxPython 4.0 and the lastest compatible versions of all other packages into a single-download installer. While a single set of files is used to run GSAS-II, regardless of platform or Python/package versions, there are potential differences in how some code behaves with these changes. We consider these packages to be somewhat experimental until we gain more experience and would encourage experienced users to try them out, before removing their existing Python 2.7-based GSAS-II installation.

To use these, please download the appropriate file:

Windows

Install Miniconda from https://repo.continuum.io/miniconda
  • You will need to accept the license agreement.
  • Select "Just Me" unless you want to run Python from multiple accounts on your computer and are logged into an admin account. Use of "Just Me" is recommended.
  • Select the installation location with some care. Avoid any path that contains a space in it (avoid C:\Users\Brian Toby\Miniconda3). I suggest C:\conda3 unless D: (etc.) would be a better choice. Make a note of the path you use and change subsequent commands to use this path if you use something else.
  • Unselect both of the two "Advanced option" boxes, unless you are planning to do your own development in Python and understand what they do.
  • Click on "Install" and wait a few minutes while the minimal Python files are unpacked and are installed on your computer.
  • On the Thanks page, you may want to unselect the two boxes, but do note that the Anaconda folks are doing a great service for science.
Start a Command window

In the start menu, look for an Anaconda3 Windows menu item and No image "menucommand.png" attached to G2onPy3 select the "Anaconda Prompt" item.

  • This will start a cmd.exe window where Python and other Anaconda-installed tools are in the path.
  • If for some reason this command is not available. Do this: Open a "Command Prompt" window and type c:\conda3\Scripts\activate into that window to set up the Anaconda environment.
Update the Python installation

Type this command:

conda update --all

  • you will be given a list of packages that have been updated since the miniconda file was created, press enter at the Proceed prompt to perform the update. This may take a few minutes.
Add other needed packages

Type this command:

conda install matplotlib pillow pyopengl scipy svn h5py pywin32

  • You will be given a list of packages to be downloaded and installed, press enter at the Proceed prompt to perform the install. This will take at least a few minutes.
Install the wxPython package

Type this command:

pip install wxpython

  • a 23 Mb file is downloaded and installed. This usually takes less than a minute.
Install GSAS-II
  • Create an empty directory for GSAS-II. This can be done from the file explorer, or with commands such as

mkdir c:\GSASII

cd /d c:/GSASII

  • Download a script to install GSAS-II from this location:

https://subversion.xray.aps.anl.gov/trac/pyGSAS/browser/install/bootstrap.py?format=txt

and save it into that location

  • Start the GSAS-II installation process with this command:

python c:\GSASII\bootstrap.py

  • answer questions as needed.
  • The bootstrap process should load all files needed by GSAS-II and should create RunGSASII.bat (and link it on Desktop) that will start GSASII