Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify environment managed using conda #15

Merged
merged 2 commits into from
Aug 4, 2016

Conversation

dhimmel
Copy link
Member

@dhimmel dhimmel commented Jul 27, 2016

I began with the environment used by cancer-data, which uses recent versions of all explicit dependencies, such as Python 3.5.2 and pandas 0.18.1. Then, I added explicit dependencies imported by 1.TCGA-MLexample.ipynb.

For testing, it would be great if at least one OS X and one Windows reviewer can successfully install. I created the environment on a Linux platform.

I began with the environment used by
https://github.com/cognoma/cancer-data/blob/02a306aae0018623e495ed043ae47f5fccf3c370/environment.yml
which uses recent versions of all explicit dependencies, such as Python 3.5.2
and pandas 0.18.1. Then, I added explicit dependencies imported by
`1.TCGA-MLexample.ipynb`.
@dhimmel
Copy link
Member Author

dhimmel commented Aug 1, 2016

@cgreene @gwaygenomics -- Y/N?

@dhimmel
Copy link
Member Author

dhimmel commented Aug 1, 2016

Confirming that the environment installs and activates properly on OS X.


This repository uses [conda](http://conda.pydata.org/docs/ "Conda package management system and environment management system documentation") to manage its environment and install packages. If you don't have conda installed on your system, you can [download it here](http://conda.pydata.org/miniconda.html "Miniconda Homepage"). You can install the Python 2 or 3 version of Miniconda (or Anaconda), which determines the Python version of your root environment. Since we create a dedicated environment for this project, named `cognoma-machine-learning` whose explicit dependencies are specified in [`environment.yml`](environment.yml), the version of your root environment will not be relevant.

With conda, you can create the `cognoma-machine-learning` environment using:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add note here about forking/cloning repository before creating the environment - at least something mentioning the specific environment.yml must be in directory

@gwaybio
Copy link
Member

gwaybio commented Aug 2, 2016

I am trying to install the environment in cygwin on windows 10. I got this error:

Greg@Greg ~/repos/machine-learning
$ conda env create --quiet --force --file environment.yml
Fetching package metadata: ....
Using Anaconda Cloud api site https://api.anaconda.org
Using Anaconda Cloud api site https://api.anaconda.org
Error: No packages found in current win-64 channels matching: scipy 0.18|0.18.0*

@dhimmel
Copy link
Member Author

dhimmel commented Aug 2, 2016

Okay I think we can drop scipy to 0.17.1. This is sad becasue 0.18.0 did bring lot's of changes. Eventually, we can return to 0.18.0 once Anaconda creates a Windows build. See ContinuumIO/anaconda-issues#925 for more information on the missing package issue.

Will try out the downgrade.

@dhimmel
Copy link
Member Author

dhimmel commented Aug 2, 2016

Confirming that the updated environment.yml with scipy=0.17.1 installs on linux.

@gwaygenomics, can you test out Windows again?

I used:

conda remove --name cognoma-machine-learning --all

to remove the existing cognoma-machine-learning environment.

@gwaybio
Copy link
Member

gwaybio commented Aug 3, 2016

environment.yml installs with scipy=0.17.1 but not cleanly. I get this error now:

$ conda env create --quiet --force --file environment.yml
Fetching package metadata .........
Solving package specifications: ..........
        1 file(s) copied.
No psutil available.
To proceed, please conda install psutil#
# To activate this environment, use:
# $ source activate cognoma-machine-learning
#
# To deactivate this environment, use:
# $ source deactivate

which seems to have been an issue in the past.

I was able to activate the environment with source activate (even without psutil) but it is unclear how this will impact downstream processes

@dhimmel
Copy link
Member Author

dhimmel commented Aug 3, 2016

I'm starting to wonder if it makes sense just to specify an entire anaconda release, e.g. anaconda=4.1.1. This will require installing more stuff, but should sidestep these OS-compatibility issues.

What happens if you run conda install psutil inside your windows environment?

I think we'll probably be fine without psutil installed, but don't know for sure.

@gwaybio
Copy link
Member

gwaybio commented Aug 3, 2016

What happens if you run conda install psutil inside your windows environment?

it installs without error! But for some reason I still get the psutils error when I try to create the environment once again.

@gwaybio
Copy link
Member

gwaybio commented Aug 4, 2016

ok, @dhimmel and I just discussed this issue - since the psutils error in windows does not seem to impact the environment install, we're going to keep the .yml file as is with scipy=0.17.1 to maintain OS environment consistency. If there are any windows users that come across any additional bugs please file an issue!

@gwaybio gwaybio merged commit a8ae611 into cognoma:master Aug 4, 2016
@dhimmel dhimmel deleted the environment branch August 4, 2016 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants