Windows Installation: Difference between revisions

From Global Meteor Network
Jump to navigation Jump to search
Line 9: Line 9:


* Download Visual Studio 2022 Community Edition.
* Download Visual Studio 2022 Community Edition.
https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019
https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019. (this now takes you to the Visual Studio 2022 installation page)


* Run the installer.
* Click to install Community edition. This will download and run the installer.
* In the left panel, select Desktop development with C++.  
* In the left panel, select Desktop development with C++.  
* Note that you don't need python development.  
* ''Note that you don't need python development''.  
 
* On the right panel ensure the latest versions of MSVC v143 - VS 2022 C++ x64/x86 build tools and Windows 10 SDK are selected. You can also select CLI Tools.  
* On the right panel ensure the latest versions of MSVC v143 - VS 2022 C++ x64/x86 build tools and Windows 10 SDK are selected. You can also select CLI Tools.  



Revision as of 05:49, 16 November 2021

Basic Instructions

There are more detailed instructions, with pictures, here but the below should work for most users.

Note: you will need about 2.5GB of space on your hard disk for the support tools.

Install Required Tools

install MS Visual Studio Build Tools

(updated Nov 2021)

  • Download Visual Studio 2022 Community Edition.

https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019. (this now takes you to the Visual Studio 2022 installation page)

  • Click to install Community edition. This will download and run the installer.
  • In the left panel, select Desktop development with C++.
  • Note that you don't need python development.
  • On the right panel ensure the latest versions of MSVC v143 - VS 2022 C++ x64/x86 build tools and Windows 10 SDK are selected. You can also select CLI Tools.
  • Click install. Its a 10.5GB package so it'll take a while.

Install Anaconda for Windows

  • Download Anaconda from here https://www.anaconda.com/products/individual
  • Run the installer.
  • Unless you intend to use Anaconda for other python development, you can select the default options at every stage.
  • Its a 500MB download and installation may take 20-30 minutes.

Install Git for Windows

Download RMS and Set it Up

Clone the RMS code to your PC

  • From the Start Menu, open an Anaconda Powershell prompt and change directory to the place you want to keep the code.
  • Run this command:
 git clone https://github.com/CroatianMeteorNetwork/RMS.git
  • This will create a new folder "RMS" containing the code.

Create an Anaconda virtual environment

  • Still in the anaconda powershell window, type the following:
conda create -n RMS python=3.8
  • This will create a python virtual environment named "RMS" containing python 3.8

Install the required Python packages

  • Still in the anaconda powershell window type the following to activate the virtual environment:
conda activate RMS
  • the prompt should change to "(RMS) c:\source\" or something similar
  • change directory into the RMS folder.
  • Now install the required Python modules by running these commands:
pip install -r requirements.txt
pip install PyQt5
pip install opencv_python
pip install rawpy

Test RMS worked

  • To test that RMS worked, type the following in the same Window:
 python -m Utils.SkyFit2 
  • The first time you run RMS it will compile various code modules, but at the end of the process you should see this message:
usage: SkyFit2.py [-h] [-c CONFIG_PATH] [-r] [-t TIME] [-f FPS]
                  [-g CAMERA_GAMMA] [-p GEO_POINTS_PATH]
                  INPUT_PATH
SkyFit2.py: error: the following arguments are required: INPUT_PATH 
  • This indicates that RMS is installed properly.

Setting RMS up for your Cameras

RMS reads its settings from a hidden file .config which is in the folder /home/pi/source/RMS on each Pi, and is also copied to the ArchivedFiles/ folder containing the night's data. You can copy this file to the RMS folder on your PC if you want.

Update Regularly!!!

The RMS code is FREQUENTLY updated and so its important that you update it too. On the Pi, this is automatic but on your PC you need to do it yourself.

To update the code, open an Anaconda Powershell window, activate the RMS environment and then type:

git stash
git pull
git stash apply

This will 'stash' your local changes such as the config file, pull the latest code, and then reapply your local changes.

Thats It

That's it! Any time you want to run RMS you just

  • open an Anaconda Powershell prompt
  • change directory to the RMS folder
  • activate the virtual environment
 conda activate RMS
  • and then run the module you want to use.