How to install pymonad
with pipenv
pipenv
combines the functionality of pip
and virtualenv
on a
per project basis. It's pretty easy to use and it sets up your
virtual environments automatically.
If you haven't already installed pipenv
we'll do that first.
pip install pipenv
Once pipenv
is installed there are two ways that you can install
pymonad
for local development.
- Install from the Python Package Index (PyPI)
- Install from the source distribution
Installing from PyPI
Start by creating a folder for your project and navigating into it.
mkdir MyProject
cd MyProject
Then use pipenv
to install pymonad
.
pipenv --three install pymonad
This command will automatically create a virtual environment in the
MyProject
directory and adds two files, Pipfile
and
Pipfile.lock
. The --three
flag ensures that pipenv
creates a
virtual environment for python3
which is required for pymonad
.
Installing from source
To install pymonad
from source, first download the source code
from bitbucket. You can either download the project as a zip
archive here, or clone the repository with git
.
git clone https://bitbucket.org/jason_delaat/pymonad.git
Put the pymonad
directory somewhere that makes sense and then
create and navigate to your project directory.
mkdir MyProject
cd MyProject
And use pipenv
to install. Assuming you've put the pymonad
directory in ~/lib/
then you would type:
pipenv --three install -e ~/lib/pymonad
Checking that it works
If everything worked correctly you can activate your virtual environment with:
pipenv shell
Now, launch the python
REPL
python
And import the pymonad.tools
module.
import pymonad.tools
If you don't get an error message then everything is working correctly.