nanophotonics / nplab

Core functions and instrument scripts for the Nanophotonics lab experimental scripts
GNU General Public License v3.0
38 stars 15 forks source link

Added install_requires to accelerate package installation #98

Closed YagoDel closed 4 years ago

YagoDel commented 4 years ago

Fixes #94

Not fully ideal (traits are not installed, and open-cv is installed from an unofficial channel), but since people are working in different environments, it does the job of accelerating installation of packages

eoinell commented 4 years ago

Should we be using the requirements.txt file that Keri made instead/as well? I just made one now which is v slightly different.

This file may be used to create an environment using:

$ conda create --name --file

platform: win-64

colorama=0.4.1=py37_0 h5py=2.8.0=py37h3bdd7fb_2 matplotlib=3.1.1=py37hc8f65d3_0 multiprocess=0.70.9=py37hfa6e2cd_0 numpy=1.16.5=py37h19fb1c0_0 opencv=3.4.1=py37h6fd60c2_3 pillow=6.2.1=py37hdc69c19_0 py-opencv=3.4.1=py37h1b0d24d_3 pyqt=5.9.2=py37h6538335_2 pyqtgraph=0.10.0=py37h28b3542_3 pyserial=3.4=py37_0 pyvisa=1.10.1=py37_0 qtpy=1.9.0=py_0 scipy=1.3.1=py37h29ff71c_0 setuptools=42.0.2=py37_0 traits=5.2.0=py37he774522_0 traitsui=6.1.3=py_0

YagoDel commented 4 years ago

Two things:

rwb27 commented 4 years ago

I've been using requirements.txt (I think I'm still signed in as Kerri on some of my computers) because I've switched to installing everything with pip - I don't use anaconda everywhere. I'm assuming install_requires also pulls things in via pip?

eoinell commented 4 years ago

I think we're going to keep using anaconda in nplab. I'll make a batch script to speed up install package installation for python 3. Something like FOR /F "delims=~" %f in (requirements.txt) DO conda install --yes "%f" || pip install "%f" as mentioned above.

This should be handy as we convert our labs in the new year. .yml files seem to over-specify package versions, but conda environments are relatively simple for people to set up.

YagoDel commented 4 years ago

@rwb27 yes, install_requires also pulls via pip. And I also install almost everything via pip, but there are a few of these packages that seem to require compiling (I think open-cv for example). So if you don't have Visual Studio installed, it's only possible via conda, right?