Pass flags to pip to install a project from a commit version

0 views
Skip to first unread message

Victor Escorcia

unread,
Nov 30, 2016, 7:54:43 AM11/30/16
to conda - Public
Hi,

I want to install a package from a commit version in a reproducible way. It is possible that YAML-file explicitly mentions (and reproduce) the appropriate behavior.
I describe two hacks around below (based on SO answer) but I want to know if this is the best reproducible YAML that I can distribute?

Hack using conda

This will create a folder called "src" inside your project that you can't delete.

name: daps-eccv16
dependencies:
- h5py=2.6.0=np111py27_2
- hdf5=1.8.17=1
- libgfortran=3.0.0=1
- mkl=11.3.3=0
- nose=1.3.7=py27_1
- numpy=1.11.2=py27_0
- openssl=1.0.2j=0
- pandas=0.19.1=np111py27_0
- pip=9.0.1=py27_0
- psutil=5.0.0=py27_0
- python=2.7.12=1
- python-dateutil=2.6.0=py27_0
- pytz=2016.7=py27_0
- readline=6.2=2
- scipy=0.18.1=np111py27_0
- setuptools=27.2.0=py27_0
- six=1.10.0=py27_0
- sqlite=3.13.0=0
- tk=8.5.18=0
- wheel=0.29.0=py27_0
- zlib=1.2.8=3
- pip:

Hack using shell
  1. Remove the package that you install with PIP from your YAML file.
  2. Create bash script that:
    1. Create the environment from the YAML file
    2. Activate the environment
    3. Install the package that you want using pip
Thanks in advance!

Victor

Michael Sarahan

unread,
Nov 30, 2016, 10:55:37 AM11/30/16
to Victor Escorcia, conda - Public
This is an excellent use case for creating a conda package for your special versions, and keeping them on an anaconda.org channel.

There is already a good recipe for theano that should get you started:


For lasagne, you might be able to use conda-skeleton:

conda skeleton pypi lasagne

For both of these recipes, you will then use conda-build to build the packages.  Conda-build can also upload them for you to Anaconda.org.

I hope this helps you get started.  Sorry I don't have time to write more detailed instructions.

--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+un...@continuum.io.
To post to this group, send email to co...@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/d33a0981-2eb6-417d-b7ee-61e6b2d3fdf3%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Victor Escorcia

unread,
Dec 5, 2016, 7:00:42 AM12/5/16
to conda - Public, esco...@gmail.com
Thank you Michael. This is a more principled solution ;)
Reply all
Reply to author
Forward
0 new messages