Last active
December 16, 2020 23:41
-
-
Save cpascual/614a72dbee51c8ecaf6a623b9e9d0d01 to your computer and use it in GitHub Desktop.
recipe for installing taurus dependencies on Windows 10 using conda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Powershell script for installing taurus dependencies on a windows10 machine using conda | |
# I use it for provisioning a vagrant win10 machine | |
# Install SSL as a workaround for conda bug https://github.com/conda/conda/issues/6064 | |
echo "Installing SSL" | |
wget "https://slproweb.com/download/Win64OpenSSL-1_1_1a.msi" -OutFile "$env:TMP\SSL.msi" | |
msiexec /quiet /i "$env:TMP\SSL.msi" | |
echo "Downloading conda" | |
$condainstallerurl = "https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe" | |
$condainstaller = "$env:TMP\\Miniconda3-latest-Windows-x86_64.exe" | |
wget $condainstallerurl -OutFile $condainstaller | |
echo "Installing conda" | |
$condainstallerargs = "/InstallationType=AllUsers /RegisterPython=1 /S /D=C:\\Miniconda" | |
# $condainstaller = "C:\\vagrant\\Miniconda3-latest-Windows-x86_64.exe" | |
Start-Process $condainstaller $condainstallerargs -Wait | |
#echo "downloading PyTango" | |
# $pytangoinstallerurl = "https://github.com/NexeyaSGara/pytango/releases/download/9.2.6/pytango-9.2.3.win-amd64-py3.6.msi" | |
# $pytangoinstaller = "$env:TMP\\pytango-9.2.3.win-amd64-py3.6.msi" | |
# wget $pytangoinstallerurl -OutFile $pytangoinstaller | |
$pytangoinstaller = "C:\\Vagrant\\pytango-9.2.3.win-amd64-py3.6.msi" | |
echo "Installing PyTango" | |
msiexec /quiet /i $pytangoinstaller | out-null | |
echo "Setting PYTHONPATH" | |
setx PYTHONPATH "C:\\Lib\\site-packages" /m | |
echo "Creating py3qt5 conda environment" | |
C:\\Miniconda\\Scripts\\conda.exe create -q -y -n py3qt5 python=3.6 pyqt=5.6.0 numpy pyqtgraph lxml qt=5.6.2 six future ipython cython scipy pillow | |
C:\\Miniconda\\Scripts\\conda.exe install -q -y -n py3qt5 -c conda-forge pythonqwt guidata | |
# C:\\Miniconda\\Scripts\\conda.exe create -q -y -n py3qt5 -f C:\\vagrant\\condaenv_py3qt5.yml | |
echo "setting variables:" | |
mkdir "C:\\Miniconda\\envs\\py3qt5\\etc\\conda\\activate.d" | |
mkdir "C:\\Miniconda\\envs\\py3qt5\\etc\\conda\\deactivate.d" | |
echo "(you may want to change TANGO_HOST in C:\\Miniconda\\envs\\py3qt5\\etc\\conda\\activate.d\\env_vars.bat)" | |
echo "TANGO_HOST='localhost:10000'" >> "C:\\Miniconda\\envs\\py3qt5\\etc\\conda\\activate.d\\env_vars.bat" | |
echo "PYTHONPATH='C:\\Lib\\site-packages'" >> "C:\\Miniconda\\envs\\py3qt5\\etc\\conda\\activate.d\\env_vars.bat" | |
echo "TANGO_HOST=" >> "C:\\Miniconda\\envs\\py3qt5\\etc\\conda\\deactivate.d\\env_vars.bat" | |
echo "PYTHONPATH=" >> "C:\\Miniconda\\envs\\py3qt5\\etc\\conda\\deactivate.d\\env_vars.bat" | |
echo "END OF PROVISION" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment