-
Notifications
You must be signed in to change notification settings - Fork 2
Installation
This installation guide is focused on getting first time users started on the Fisk CubeSat code repository. Advanced users can skip most (or all) of this installation guild. Please make improvements to this guide as issue crop up.
It is always a good idea to back up you commuter before making any major changes. That way you can always start over if something undesirable happens.
You first need to check if you computer is running a 32-bit or 64-bit version of windows. a) Find window Settings b) Click on System Settings c) Click on About d) Scroll to System Type and there you can find information about the bit-ness of your operating system (OS) and your processor. Mine says "System type 64-bit operating system, x64-based processor"
Next download the version of GIT for Window, if you are lucky the link will still exist here: https://git-scm.com/download/win
a) Run the downloaded program, and start the installation. b) I unchecked the Windows Explorer integration and its sub-options. c) I selected use GIT from the Windows Command Prompt d) I selected Use the OpenSSL library e) Please select Chechout Windows-style, commit UNIX style line endings f) I selected Use Widows' default console window. g) I left Enable file system caching and Enable GIT Credential Manager checked.
This is mostly the default installation, feedback on how this choices effect the end result is appreciated.
Step 3: Sign up for GitHub, an online code repository and version control service (free for our uses).
a) Create a username, and password by signing up here https://github.com/. b) Don't forget to confirm you email address at the end of the sign up.
Note: this is the site that hosts the Fisk Cubesat code and this wiki that you are currently reading.
Download the PyCharm Community Edition for your Window' computers' bitness at the following link. https://www.jetbrains.com/pycharm/download/#section=windows
a) Run the the downloaded program and start the installation. b) I selected to create a 64-bit launcher and to make associations with files the end in the suffix .py, otherwise I did the default installation. c) Finish the installation and run PyCharm. d) For a fresh install, select Do not import settings e) Accept the privacy policy. f) I like the following settings for PyCharm's Keymap and look; Keymap scheme: IntelliJ IDEA Classic, IDE theme: Darcula, Editor colors and fonts: Monokai.
a) Launch PyCharm and select Check out From Version Control and from the drop down menu select GitHub. b) Change Auth Type: to password and enter the user name and password that you registered and confirmed in step 3. c) For the Git Repository ULR carefully cut-and-paste https://github.com/chw3k5/fiskCubeSat.git. The other test boxes should look like Parent Directory: C:\Users\my username\PycharmProjects, and Directory Name: fiskCubeSat d) Click on Clone e) Close the tip of the day f) In the lower-left of the PyCharm Window, click on the small square icon. This pops up short cuts to some of the many development features for PyCharm g) In the left side of the window click on project to expand the directory structure of the Fisk CubeSat code repository. h) Expand the directory structure by clicking on the clicking on the triangle to the left of fiskCubeSat and select a .py file to open.
This step can be skipped if you already have python 2.7 somewhere on your computer.
a) Navigate to https://www.python.org/downloads/windows/ and click the link for Latest Python 2 release At the time this wiki was written it was python 2.7.13. I expect it to be python 2.7.x, as micro releases are now the only updates for Python 2. This micro releases mostly add backwards compatibility for Python 2 to work with new projects and ideas that are made for Python 3. b) depending on the bit-ness of your computer (see step 1) you will use a different installer. For 64-bit installation I selected Windows x86-64 MSI installer to download. c) Run the Python installer. d) Install for all users. Install in _C:\Python27_. This is the default installation. Window may complain about a program making change to your computer, allow those changes. e) Finish the installation
a) Open fiskCubesat protect in PyCharm. b) In PyCharm, go to File -> Settings (Or Use Ctl-Alt-S). Then select click the triangle next to Project: fiskCubeSat and select "Project Interpreter". c) In the main settings window area on the right, you will see the entry at the top of the window for Project Interpreter: with a drop down menu. d) Click on the down triagle for the drop down menu and select the (which may have been freshly installed in step 6) C:\Python27\python.exe. e) Click the Apply button at the bottom-right of the settings window.
PyCharm is a great way to maintain and update additional packages to python. But sometimes this fails. Particularity for the scipy package. If this happen,s you will need to see the additional steps below that have work around for failed package installations.
a) Open fiskCubesat protect in PyCharm. b) In PyCharm, go to File -> Settings (Or Use Ctl-Alt-S). Then select click the triangle next to Project: fiskCubeSat and select "Project Interpreter". c) In the main settings window area on the right, you will see the entry at the top of the window for Project Interpreter: with a drop down menu. If you have been following this guide the the interpreter will be C:\Python27\python.exe but any Python 2.7 interpreter will do. d) To add a Python 2.7 package, click on the green 'plus' icon on near the upper right of the settings window. e) Search for the package you want to install, such as numpy, once selected click install package. f) If you are lucky A green bar will appear that says _Package 'package name' installed successfully. Some packages can be installed through this process but some cannot. If the installation fails for some or all of the packages you need see the additional package installation steps below.
Packages known to install successfully using PyCharm: numpy pyserial matplotlib
Scipy is not an easy package to install. It uses a lot of precompiled c programs to do math really fast, which is a good thing. However, these files need to be compiled for the your computer's CPU architecture so this mean a custom installation. The main issue is the BLAS, a precompiled http://www.lfd.uci.edu/~gohlke/pythonlibs algebra toolbox.
This step assumes you have installed python as outlined in step 6. This step uses the ideas from http://stackoverflow.com/questions/28190534/windows-scipy-install-no-lapack-blas-resources-found
a) Download the numpy+mkl and scipy wheel files from http://www.lfd.uci.edu/~gohlke/pythonlibs.
b) Use ctl+F to search for the phrase 'Numpy+mkl' and click on the link to find those binary files. Download the latest file for the correct bitness (see step 1) for your computer, I downloaded numpy‑1.12.1+mkl‑cp36‑cp36m‑win_amd64.whl. You should look for the latest versions of the files.
c) Use ctl+F to search for the phrase 'Scipy' and click on the link to find those binary files. Download the latest file for the correct bit-ness (see step 1) for your computer, I downloaded scipy‑0.19.0‑cp36‑cp36m‑win_amd64.whl.
d) Download Microsoft Visual Studio Community Edition from https://www.visualstudio.com/downloads/, and run the program.
e) Install the Microsoft Visual Studio Community base package, with all c++, .net frameworks, and python add-ons.
f) When prompted, make a visual studio's account.
g) Download Microsoft C++ compiler for Python 2.7 here https://www.microsoft.com/en-us/download/details.aspx?id=44266 and run the program. This installation has no options.
h) Run the windows command prompt (search for the program 'cmd').
i) When cmd is open it will be a black window with white text that says something like 'C:\Users\yourUserName>' type 'cd ../../' to get to the part of the C drive where python is installed. Here 'cd' means change directory and '../' means go to parent directory of the current directory, we do that twice to get to 'C:>'
j) change directory to python 2.7 on my computer that is in C:\Python27\ so I type 'cd Python27' and the prompt will then read 'C:\Python27>'
k) enter the command python -m pip install directoryName\filename.whl to install Numpy with mkl and scipy. directoryName will be where you downloaded Numpy+mkl and scipy in parts b) and c) of this step. For me this was the commands python -m pip install "C:\Users\little pc\Downloads\numpy-1.12.1+mkl-cp36-cp36m-win_amd64.whl" and then python -m pip install "C:\Users\little pc\Downloads\scipy-0.19.0-cp36-cp36m-win_amd64.whl"
This part is not fleshed out yet. Try to follow the windows installation but when installing scipy and other complex packages, use homebrew
(http://docs.brew.sh/Homebrew-and-Python.html).