



Plumbum (Latin for lead, which was used to create pipes back in the day) is a small yet feature-rich library for shell script-like programs in Python.ģ. Python module for easy communication over pipes Lightweight pipelining: using Python functions as pipeline jobs. 正题:如何使用 MacPorts 安装并使用 Python 和 pip? 环境:Mac OS X Mavericks Depending on the system and shell you use, this can be e.g. To make things easier, you may want to add shell aliases for the activation command to your shell config file. Python -m virtualenv -p python3 ~/p圓_kernel Python -m virtualenv -p python2 ~/py2_kernel
Macports python pip install#
Next prepare and register the kernel environments python -m pip install virtualenv -user On ubuntu you would install these by: sudo apt-get install python-dev python3-dev python-pip python3-pip I assume that you already have jupyter notebook installed.įirst make sure that you have a python2 and a python3 interpreter with pip available. If you are using anaconda, please find my other answer for a solution directly tailored to anaconda.
Macports python pip how to#
These instructions explain how to install a python2 and python3 kernel in separate virtual environments for non-anaconda users. See ipython kernel install -help for more informations. Users who do not want to use nb_conda_kernels or still use older versions of anaconda can use the following steps to manually register ipython kernels.Ĭonfigure the python2.7 environment: conda create -n py27 python=2.7Ĭonfigure the python3.6 environment: conda create -n p圓6 python=3.6Īfter that you should be able to choose between python2Īnd python3 when creating a new notebook in the interface.Īdditionally you can pass the -name and -display-name options to ipython kernel install if you want to change the names of your kernels. The Managing environments section in conda's docs provides further information. Please note that new packages have to be explicitly installed into the new environments. This makes using a new python version as easy as creating new conda environments: conda create -n py27 python=2.7 ipykernelĬonda create -n p圓6 python=3.6 ipykernelĪfter a restart of jupyter notebook, the new kernels are available over the graphical interface. Since version 4.1.0, anaconda includes a special package nb_conda_kernels that detects conda environments with notebook kernels and automatically registers them. If you are not using anaconda, I recently added instructions using pure virtualenvs. The idea here is to install multiple ipython kernels.
