@@ -22,7 +22,14 @@ work on CKAN.
22
22
If you're using a Debian-based operating system (such as Ubuntu) install the
23
23
required packages with this command::
24
24
25
- sudo apt-get install python-dev postgresql libpq-dev python-pip python-virtualenv git-core solr-jetty openjdk-8-jdk redis-server
25
+ sudo apt-get install python3-dev postgresql libpq-dev python3-pip python3-venv git-core solr-jetty openjdk-8-jdk redis-server
26
+
27
+ .. note ::
28
+
29
+ For Python 2 (deprecated, but compatible with CKAN 2.9 and earlier), do
30
+ this instead:
31
+
32
+ sudo apt-get install python-dev postgresql libpq-dev python-pip python-virtualenv git-core solr-jetty openjdk-8-jdk redis-server
26
33
27
34
If you're not using a Debian-based operating system, find the best way to
28
35
install the following packages on your operating system (see
@@ -32,16 +39,16 @@ wiki page for help):
32
39
===================== ===============================================
33
40
Package Description
34
41
===================== ===============================================
35
- Python `The Python programming language, v2.7 < http ://www.python.org/getit/ >`_
36
- |postgres | `The PostgreSQL database system, v9.3 or newer <http ://www.postgresql.org/download/ >`_
42
+ Python `The Python programming language, v3.6 or newer (or v2.7) < https ://www.python.org/getit/ >`_
43
+ |postgres | `The PostgreSQL database system, v9.3 or newer <https ://www.postgresql.org/docs/9.5/libpq.html >`_
37
44
libpq `The C programmer's interface to PostgreSQL <http://www.postgresql.org/docs/8.1/static/libpq.html >`_
38
- pip `A tool for installing and managing Python packages <http ://www. pip-installer.org >`_
39
- virtualenv `The virtual Python environment builder < http ://www. virtualenv.org >`_
40
- Git `A distributed version control system <http ://book. git-scm.com/2_installing_git.html >`_
41
- Apache Solr `A search platform <http ://lucene.apache.org/solr >`_
42
- Jetty `An HTTP server <http ://www.eclipse.org/jetty/ >`_ (used for Solr).
43
- OpenJDK JDK `The Java Development Kit <http ://openjdk.java.net/install/ >`_ (used by Jetty)
44
- Redis `An in-memory data structure store <http ://redis.io/ >`_
45
+ pip `A tool for installing and managing Python packages <https ://pip.pypa.io/en/stable/ >`_
46
+ python3-venv `The Python3 virtual environment builder (or for Python 2 use 'virtualenv' instead) < https ://virtualenv.pypa.io/en/latest/ >`_
47
+ Git `A distributed version control system <https ://git-scm.com/book/en/v2/Getting-Started-Installing-Git >`_
48
+ Apache Solr `A search platform <https ://lucene.apache.org/solr/ >`_
49
+ Jetty `An HTTP server <https ://www.eclipse.org/jetty/ >`_ (used for Solr).
50
+ OpenJDK JDK `The Java Development Kit <https ://openjdk.java.net/install/ >`_ (used by Jetty)
51
+ Redis `An in-memory data structure store <https ://redis.io/ >`_
45
52
===================== ===============================================
46
53
47
54
@@ -66,28 +73,16 @@ Redis `An in-memory data structure store <http://redis.io/>`_
66
73
mkdir -p ~/ckan/etc
67
74
sudo ln -s ~/ckan/etc |config_parent_dir |
68
75
69
- a. Create a Python `virtual environment <http ://www. virtualenv.org >`_
76
+ a. Create a Python `virtual environment <https ://virtualenv.pypa.io/en/latest/ >`_
70
77
(virtualenv) to install CKAN into, and activate it:
71
78
72
79
.. parsed-literal ::
73
80
74
81
sudo mkdir -p |virtualenv |
75
82
sudo chown \` whoami\` |virtualenv |
76
- virtualenv --no-site-packages |virtualenv |
83
+ python3 -m venv |virtualenv |
77
84
|activate |
78
85
79
- .. note ::
80
-
81
- If your system uses Python3 by default (e.g. Ubuntu 18.04) make sure to create
82
- the virtualenv using the Python2.7 executable with the ``--python `` option:
83
-
84
- .. parsed-literal ::
85
-
86
- sudo mkdir -p |virtualenv |
87
- sudo chown \` whoami\` |virtualenv |
88
- virtualenv --python=/usr/bin/python2.7 --no-site-packages |virtualenv |
89
- |activate |
90
-
91
86
.. important ::
92
87
93
88
The final command above activates your virtualenv. The virtualenv has to
@@ -105,11 +100,21 @@ a. Create a Python `virtual environment <http://www.virtualenv.org>`_
105
100
106
101
|activate |
107
102
108
- b. Install the recommended ``setuptools `` version:
103
+ .. note ::
104
+
105
+ For Python 2 then replace the `python3 -m venv ` command with:
106
+
107
+ .. parsed-literal ::
108
+
109
+ virtualenv --python=/usr/bin/python2.7 --no-site-packages |virtualenv |
110
+ |activate |
111
+
112
+ b. Install the recommended ``setuptools `` version and up-to-date pip:
109
113
110
114
.. parsed-literal ::
111
115
112
116
pip install setuptools==\ |min_setuptools_version |
117
+ pip install --upgrade pip
113
118
114
119
c. Install the CKAN source code into your virtualenv.
115
120
@@ -140,6 +145,10 @@ d. Install the Python modules that CKAN requires into your virtualenv:
140
145
141
146
pip install -r |virtualenv |/src/ckan/requirements.txt
142
147
148
+ .. note ::
149
+
150
+ For Python 2 adjust the filename to: `requirements-py2.txt `
151
+
143
152
e. Deactivate and reactivate your virtualenv, to make sure you're using the
144
153
virtualenv's copies of commands like ``paster `` rather than any system-wide
145
154
installed copies:
0 commit comments