Quick and Dirty Installation¶
To get started with Morepath right away, first create a Python 3.7 virtualenv:
$ virtualenv morepath_env
$ source morepath_env/bin/activate
Now install Morepath into it:
$ pip install morepath
You can now use the virtual env’s Python to run any code that uses Morepath:
$ python quickstart.py
See Quickstart for information on how to get started with
Morepath itself, including an example of
Creating a Morepath Project Manually¶
When you develop a web application it’s a good idea to use standard
Python project organization practices. Organizing your Project
has some recommendations on how to do this with Morepath. Relevant in
particular is the contents of
setup.py, which depends on Morepath
and also sets up an entry point to start the web server.
Once you have a project you can use tools like pip. We’ll briefly describe how to it.
With pip and a virtualenv called
morepath_env, you can do this in
your project’s root directory:
$ pip install --editable .
You can now run the application like this (if you called the console
Depending on Morepath development versions¶
If you like being on the cutting edge and want to depend on the latest Morepath and Reg development versions always, you can install these using pip (in a virtualenv). Here’s how:
$ pip install git+git://github.com/morepath/reg.git@master
$ pip install git+git://github.com/morepath/morepath.git@master
A more involved method how to install Morepath for development is described in Developing Morepath.