Repository navigation
Expand file tree
/
Copy path_development
More file actions
42 lines (25 loc) · 3.48 KB
/
Copy path_development
File metadata and controls
42 lines (25 loc) · 3.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
1. To compile an exe file use (in the Anaconda prompt):
pyinstaller --onefile --windowed main.py
2. All png files need to be stripped of iCCP
pngcrush -rem iCCP -e out.png infile.png
Copy chemDB.json and the icons folder to the same folder as the executable file
3. Installing a package in the editable mode. Copy the package to a local directory C:\path\package.
pip install -e C:\Path\package
4. Uninstall a package:
pip uninstall packagename
5. Installing geopandas:
https://geoffboeing.com/2014/09/using-geopandas-windows/
6. Cloning an environment in Anaconda
conda env export > environment.yml
7. Extensions for Jupyter Notebook (e.g. code folding)
pip install jupyter_contrib_nbextensions
To set up the software to be run from the code:
1. Install Anaconda, https://www.anaconda.com/. It makes managing Python packages and the associate software tools so much easier.
2. Import the python environment from a .yml file that lists all packages on my machine. For this, in the Anaconda navigator go to Environments -> Import and select the desired file (e.g. py35.yml -- the newest version is available in the repository on GitHub. You may need to change the prefix parameter in the .yml file to reflect the path on your system, but sometimes it works even without doing that). This will download (almost) all necessary packages and install them on your system. When you will be running the code, please make sure that the correct Environment is selected on the Home page in Anaconda Navigator.
3. You may want to install Git Desktop if you'd like, and clone the repository from there, but likely all you need is to update the code periodically, for which working in the terminal should suffice.
4. After you've imported the .yml file, a new entry should appear on the Environments tab in Anaconda. Left click on the triangle and Open the Terminal -- it is advised to use this Terminal window, instead of opening one from a windows folder; Anaconda terminal has some additional useful commands for working with the Environments.
5. Create a new folder where you'd like to keep the code, e.g. C:\Users\yma80\AnacondaProjects\nmrQuant on my machine, and navigate there in the Terminal (using the 'cd' command). Run 'git clone https://github.com/genematx/nmrQuant.git'. This should download the latest version of the code from the server. When you'd like to update the local repository, run 'git pull'.
6. Install nmrglue. This is a Python package that implements standard NMR algorithms (i.e. phase and baseline correction). Since I've modified it for my own purposes (e.g. to be able to open Spinsolve files), we need to install 'my' version manually. Simply copy the attached nmrglue folder to the parent folder of your project (e.g. C:\Users\yma80\AnacondaProjects, or anywhere else you'd like) and the run 'pip install -e C:\path_where_you_saved_nmrglue\nmrglue' in the Terminal.
7. Try running the code (note, it won't work first; we'll likely need to install a few other things). For this, in the Home page of Anaconda, run Spyder; it will open a Matlab-like IDE.
8. In Spyder, open the file main.py of the code and click run. In the console, it will start complaining about missing packages, for example 'dill' -- I have no idea why it does this, apparently it hasn't been installed correctly. To fix this, in the terminal run 'pip install whatever_package_it_complains_about' -- it shouldn't take long.
9. Install OpenEyes Toolkits, https://docs.eyesopen.com/toolkits/python/quickstart-python/windows.html#figure-anaconda-add-channel