posted on: 2018-01-26 11:43:47
On my mac I am using anaconda and on various linux computers I am using virtualenv and pip. I think, although I don't know, that anaconda is using virtualenv under the hood.

Anaconda first.

Create the environment:

    conda create --name my-net python=3.6 scipy

That will create a virtual environment including scipy. So start the environment

    source activate my-net

And when finished, use:

    source deactivate

After this, your shell will probably be broken so it is a good idea to start a new one, but deactivating is recommended.

Of course, once the environment is started, you'll realize that you need more libraries. So to add more libraries,

    conda install --name my-net keras

Finally, to remove an environment:

    conda env remove --name simple-py

Next steps will be for virtual env/pip.

First, I installed virtual environment and pip from the centos repos, python34-pip and python34-virtualenv. (probably didn't need pip because virtual environment installs a local version it appears).

To create an environment and install packages.

    virtualenv3 path/to/environment_name
    source path/to/environment_name/activate

That is it, then to install packages.

    pip install keras

And done. Also, there is a way to list all of the currently installed packages for migrating to a new system.

    pip list