Skip to content

Commit 5896690

Browse files
committed
first commit
0 parents  commit 5896690

8 files changed

Lines changed: 73 additions & 0 deletions

File tree

install.ps1

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# ############# INSTALL #############
2+
$path = Test-Path "${home}\Miniconda3"
3+
4+
try {
5+
If (-not $path) {
6+
Invoke-Expression "./install/setup.ps1"
7+
Write-Output "Installation complete! Run again to set-up virtual environment and install xlwings."
8+
}
9+
else {
10+
Invoke-Expression "./install/update.ps1"
11+
Write-Output "Configuration Completed!"
12+
}
13+
}
14+
catch {
15+
Write-Output "Errors occurred during installation!"
16+
}

install/setup.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# ############# SETUP #############
2+
3+
Invoke-Expression "./install/setup/download_N_install_mc.ps1"
4+
Invoke-Expression "./install/setup/config_mc.ps1"
5+
6+
exit

install/setup/config_mc.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# ############# CONFIG MC #############
2+
$Env:_CONDA_ENV = "${home}\Miniconda3\Scripts\conda.exe"
3+
Write-Output "Configuring command prompt and powershell to use miniconda, please wait..."
4+
Invoke-Expression "$Env:_CONDA_ENV init --all -v"
5+
6+
exit
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# ############# DOWNLOAD AND INSTALL MC #############
2+
Write-Output "Downloading Miniconda, please wait..."
3+
Invoke-WebRequest -Uri "https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe" -OutFile "~/Downloads/miniconda.exe"
4+
Write-Output "Installing Miniconda, please wait..."
5+
Start-Process "~/Downloads/miniconda.exe" "/S" -wait && "exit"
6+
Write-Output "Completed installing Miniconda!"
7+
Remove-Item -Path "~/Downloads/miniconda.exe"
8+
exit

install/update.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# ############# UPDATE #############
2+
3+
Invoke-Expression "./install/update/update_mc.ps1"
4+
Invoke-Expression "./install/update/venv_mc.ps1"
5+
6+
exit

install/update/update_mc.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# ############# UPDATE MC BASE #############
2+
3+
Invoke-Expression "conda update conda --all -y"
4+
Write-Output "Installing ANACONDA NAVIGATOR | JUPYTER LAB | NB CONDA, please wait..."
5+
Invoke-Expression "conda install anaconda-navigator jupyterlab nb_conda -y"
6+
exit

install/update/venv_mc.ps1

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# ############# create virtual env #############
2+
# $Env:_CONDA_ENV = "${home}\Miniconda3\Scripts\conda.exe"
3+
# $Env:_CONDA_ACT = "${home}\Miniconda3\condabin\conda.bat"
4+
Write-Output "Creating virtual environment py36 and installing required modules, please wait..."
5+
Invoke-Expression "conda create -n py36 python=3.6 ipykernel xlwings openpyxl xlrd xlwt xlsxwriter pandas -y"
6+
7+
Write-Output "Activating virtual environment 'py36'..."
8+
Invoke-Expression "conda activate py36"
9+
10+
Write-Output "Installing xlwings addin for excel..."
11+
Invoke-Expression "xlwings addin install"
12+
exit

readme.MD

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# READ ME
2+
3+
<ol>
4+
<li>Install powershell >= v7.0.3 from <a href="https://github.com/Powershell/Powershell/releases/latest">Github</a> based on your operating system | for windows search "<i><b>-win-x64.msi</b></i>" | it would be like "<b>Powershell-7.0.3-win-x64.msi</b>"
5+
</li>
6+
7+
<li>Run install.ps1 using powershell >= v7.0.3
8+
<ul>
9+
<li>click once on install.ps1 to install Miniconda</li>
10+
<li>click twice on install.ps1 to install Miniconda and create py36 virtual environment</li>
11+
</ul>
12+
</li>
13+
</ol>

0 commit comments

Comments
 (0)