Unable to install ERPNext on Ubuntu 16.04 using Easy Install (never happened before)

Hello!

Today I tried to install ERPNext on a fresh Ubuntu 16.04 machine and I got the errors below. This had never happened before. Can someone please give me some help. Thank you so much.

====================

root@core:~# sudo python install.py --production --user frappe
Hit:1 Index of /ubuntu xenial-security InRelease
Hit:2 Index of /ubuntu xenial InRelease
Hit:3 Index of /ubuntu xenial-updates InRelease
Hit:4 Index of /ubuntu xenial-backports InRelease
Reading package lists… Done
Reading package lists… Done
Building dependency tree
Reading state information… Done
build-essential is already the newest version (12.1ubuntu2).
The following additional packages will be installed:
git-man liberror-perl libexpat1-dev libpython-dev libpython2.7-dev libssl-doc python2.7-dev
zlib1g-dev
Suggested packages:
git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-arch git-cvs
git-mediawiki git-svn python-setuptools-doc
The following NEW packages will be installed:
git git-man liberror-perl libexpat1-dev libffi-dev libpython-dev libpython2.7-dev libssl-dev
libssl-doc python-dev python-setuptools python2.7-dev zlib1g-dev
0 upgraded, 13 newly installed, 0 to remove and 8 not upgraded.
Need to get 35.0 MB of archives.
After this operation, 79.1 MB of additional disk space will be used.
Get:1 Index of /ubuntu xenial/main amd64 liberror-perl all 0.17-1.2 [19.6 kB]
Get:2 Index of /ubuntu xenial-updates/main amd64 git-man all 1:2.7.4-0ubuntu1.4 [736 kB]
Get:3 Index of /ubuntu xenial-updates/main amd64 git amd64 1:2.7.4-0ubuntu1.4 [3,158 kB]
Get:4 Index of /ubuntu xenial-updates/main amd64 libexpat1-dev amd64 2.1.0-7ubuntu0.16.04.3 [115 kB]
Get:5 Index of /ubuntu xenial-updates/main amd64 libpython2.7-dev amd64 2.7.12-1ubuntu0~16.04.3 [27.8 MB]
Get:6 Index of /ubuntu xenial-updates/main amd64 libpython-dev amd64 2.7.12-1~16.04 [7,840 B]
Get:7 Index of /ubuntu xenial-updates/main amd64 zlib1g-dev amd64 1:1.2.8.dfsg-2ubuntu4.1 [168 kB]
Get:8 Index of /ubuntu xenial-updates/main amd64 libssl-dev amd64 1.0.2g-1ubuntu4.13 [1,342 kB]
Get:9 Index of /ubuntu xenial-updates/main amd64 libssl-doc all 1.0.2g-1ubuntu4.13 [1,079 kB]
Get:10 Index of /ubuntu xenial-updates/main amd64 python2.7-dev amd64 2.7.12-1ubuntu0~16.04.3 [276 kB]
Get:11 Index of /ubuntu xenial-updates/main amd64 python-dev amd64 2.7.12-1~16.04 [1,186 B]
Get:12 Index of /ubuntu xenial/main amd64 python-setuptools all 20.7.0-1 [169 kB]
Get:13 Index of /ubuntu xenial/main amd64 libffi-dev amd64 3.2.1-4 [161 kB]
Fetched 35.0 MB in 6s (5,460 kB/s)
Selecting previously unselected package liberror-perl.
(Reading database … 69471 files and directories currently installed.)
Preparing to unpack …/liberror-perl_0.17-1.2_all.deb …
Unpacking liberror-perl (0.17-1.2) …
Selecting previously unselected package git-man.
Preparing to unpack …/git-man_1%3a2.7.4-0ubuntu1.4_all.deb …
Unpacking git-man (1:2.7.4-0ubuntu1.4) …
Selecting previously unselected package git.
Preparing to unpack …/git_1%3a2.7.4-0ubuntu1.4_amd64.deb …
Unpacking git (1:2.7.4-0ubuntu1.4) …
Selecting previously unselected package libexpat1-dev:amd64.
Preparing to unpack …/libexpat1-dev_2.1.0-7ubuntu0.16.04.3_amd64.deb …
Unpacking libexpat1-dev:amd64 (2.1.0-7ubuntu0.16.04.3) …
Selecting previously unselected package libpython2.7-dev:amd64.
Preparing to unpack …/libpython2.7-dev_2.7.12-1ubuntu0~16.04.3_amd64.deb …
Unpacking libpython2.7-dev:amd64 (2.7.12-1ubuntu0~16.04.3) …
Selecting previously unselected package libpython-dev:amd64.
Preparing to unpack …/libpython-dev_2.7.12-1~16.04_amd64.deb …
Unpacking libpython-dev:amd64 (2.7.12-1~16.04) …
Selecting previously unselected package zlib1g-dev:amd64.
Preparing to unpack …/zlib1g-dev_1%3a1.2.8.dfsg-2ubuntu4.1_amd64.deb …
Unpacking zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4.1) …
Selecting previously unselected package libssl-dev:amd64.
Preparing to unpack …/libssl-dev_1.0.2g-1ubuntu4.13_amd64.deb …
Unpacking libssl-dev:amd64 (1.0.2g-1ubuntu4.13) …
Selecting previously unselected package libssl-doc.
Preparing to unpack …/libssl-doc_1.0.2g-1ubuntu4.13_all.deb …
Unpacking libssl-doc (1.0.2g-1ubuntu4.13) …
Selecting previously unselected package python2.7-dev.
Preparing to unpack …/python2.7-dev_2.7.12-1ubuntu0~16.04.3_amd64.deb …
Unpacking python2.7-dev (2.7.12-1ubuntu0~16.04.3) …
Selecting previously unselected package python-dev.
Preparing to unpack …/python-dev_2.7.12-1~16.04_amd64.deb …
Unpacking python-dev (2.7.12-1~16.04) …
Selecting previously unselected package python-setuptools.
Preparing to unpack …/python-setuptools_20.7.0-1_all.deb …
Unpacking python-setuptools (20.7.0-1) …
Selecting previously unselected package libffi-dev:amd64.
Preparing to unpack …/libffi-dev_3.2.1-4_amd64.deb …
Unpacking libffi-dev:amd64 (3.2.1-4) …
Processing triggers for man-db (2.7.5-1) …
Processing triggers for install-info (6.1.0.dfsg.1-5) …
Setting up liberror-perl (0.17-1.2) …
Setting up git-man (1:2.7.4-0ubuntu1.4) …
Setting up git (1:2.7.4-0ubuntu1.4) …
Setting up libexpat1-dev:amd64 (2.1.0-7ubuntu0.16.04.3) …
Setting up libpython2.7-dev:amd64 (2.7.12-1ubuntu0~16.04.3) …
Setting up libpython-dev:amd64 (2.7.12-1~16.04) …
Setting up zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4.1) …
Setting up libssl-dev:amd64 (1.0.2g-1ubuntu4.13) …
Setting up libssl-doc (1.0.2g-1ubuntu4.13) …
Setting up python2.7-dev (2.7.12-1ubuntu0~16.04.3) …
Setting up python-dev (2.7.12-1~16.04) …
Setting up python-setuptools (20.7.0-1) …
Setting up libffi-dev:amd64 (3.2.1-4) …
–2018-09-04 13:35:33-- https://bootstrap.pypa.io/get-pip.py
Resolving bootstrap.pypa.io (bootstrap.pypa.io)… 151.101.0.175, 151.101.64.175, 151.101.128.175, …
Connecting to bootstrap.pypa.io (bootstrap.pypa.io)|151.101.0.175|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 1642522 (1.6M) [text/x-python]
Saving to: β€˜get-pip.py’

get-pip.py 100%[=====================================>] 1.57M 3.96MB/s in 0.4s

2018-09-04 13:35:33 (3.96 MB/s) - β€˜get-pip.py’ saved [1642522/1642522]

/tmp/tmpwkGg8O/pip.zip/pip/_vendor/requests/init.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
Collecting pip
Downloading https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl (1.3MB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1.3MB 7.7MB/s
Collecting wheel
Downloading https://files.pythonhosted.org/packages/81/30/e935244ca6165187ae8be876b6316ae201b71485538ffac1d718843025a9/wheel-0.31.1-py2.py3-none-any.whl (41kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 51kB 9.8MB/s
Installing collected packages: pip, wheel
Successfully installed pip-18.0 wheel-0.31.1
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/init.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
Collecting setuptools
Downloading https://files.pythonhosted.org/packages/66/e8/570bb5ca88a8bcd2a1db9c6246bb66615750663ffaaeada95b04ffe74e12/setuptools-40.2.0-py2.py3-none-any.whl (568kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 573kB 4.8MB/s
Collecting urllib3
Downloading https://files.pythonhosted.org/packages/bd/c9/6fdd990019071a4a32a5e7cb78a1d92c53851ef4f56f62a3486e6a7d8ffb/urllib3-1.23-py2.py3-none-any.whl (133kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 143kB 13.0MB/s
Collecting requests
Downloading https://files.pythonhosted.org/packages/65/47/7e02164a2a3db50ed6d8a6ab1d6d60b69c4c3fdf57a284257925dfc12bda/requests-2.19.1-py2.py3-none-any.whl (91kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 92kB 13.2MB/s
Collecting cryptography
Downloading https://files.pythonhosted.org/packages/87/e6/915a482dbfef98bbdce6be1e31825f591fc67038d4ee09864c1d2c3db371/cryptography-2.3.1-cp27-cp27mu-manylinux1_x86_64.whl (2.1MB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2.1MB 8.5MB/s
Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages (18.0)
Collecting certifi>=2017.4.17 (from requests)
Downloading https://files.pythonhosted.org/packages/df/f7/04fee6ac349e915b82171f8e23cee63644d83663b34c539f7a09aed18f9e/certifi-2018.8.24-py2.py3-none-any.whl (147kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 153kB 10.9MB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests)
Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 143kB 13.7MB/s
Collecting idna<2.8,>=2.5 (from requests)
Downloading https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl (58kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 61kB 16.4MB/s
Requirement already satisfied, skipping upgrade: enum34; python_version < β€œ3” in /usr/lib/python2.7/dist-packages (from cryptography) (1.1.2)
Collecting asn1crypto>=0.21.0 (from cryptography)
Downloading https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl (101kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 102kB 12.9MB/s
Collecting cffi!=1.11.3,>=1.7 (from cryptography)
Downloading https://files.pythonhosted.org/packages/14/dd/3e7a1e1280e7d767bd3fa15791759c91ec19058ebe31217fe66f3e9a8c49/cffi-1.11.5-cp27-cp27mu-manylinux1_x86_64.whl (407kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 409kB 9.5MB/s
Requirement already satisfied, skipping upgrade: six>=1.4.1 in /usr/lib/python2.7/dist-packages (from cryptography) (1.10.0)
Requirement already satisfied, skipping upgrade: ipaddress; python_version < β€œ3” in /usr/lib/python2.7/dist-packages (from cryptography) (1.0.16)
Collecting pycparser (from cffi!=1.11.3,>=1.7->cryptography)
Downloading https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz (245kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 256kB 14.0MB/s
Building wheels for collected packages: pycparser
Running setup.py bdist_wheel for pycparser … done
Stored in directory: /root/.cache/pip/wheels/c0/a1/27/5ba234bd77ea5a290cbf6d675259ec52293193467a12ef1f46
Successfully built pycparser
Installing collected packages: setuptools, urllib3, certifi, chardet, idna, requests, asn1crypto, pycparser, cffi, cryptography
Found existing installation: setuptools 20.7.0
Uninstalling setuptools-20.7.0:
Successfully uninstalled setuptools-20.7.0
Found existing installation: urllib3 1.13.1
Uninstalling urllib3-1.13.1:
Successfully uninstalled urllib3-1.13.1
Found existing installation: chardet 2.3.0
Uninstalling chardet-2.3.0:
Successfully uninstalled chardet-2.3.0
Found existing installation: idna 2.0
Uninstalling idna-2.0:
Successfully uninstalled idna-2.0
Found existing installation: requests 2.9.1
Uninstalling requests-2.9.1:
Successfully uninstalled requests-2.9.1
Found existing installation: cryptography 1.2.3
Uninstalling cryptography-1.2.3:
Successfully uninstalled cryptography-1.2.3
Successfully installed asn1crypto-0.24.0 certifi-2018.8.24 cffi-1.11.5 chardet-3.0.4 cryptography-2.3.1 idna-2.7 pycparser-2.18 requests-2.19.1 setuptools-40.2.0 urllib3-1.23
Traceback (most recent call last):
File β€œ/usr/local/bin/pip”, line 7, in
from pip._internal import main
File β€œ/usr/local/lib/python2.7/dist-packages/pip/_internal/init.py”, line 42, in
from pip._internal import cmdoptions
File β€œ/usr/local/lib/python2.7/dist-packages/pip/_internal/cmdoptions.py”, line 16, in
from pip._internal.index import (
File β€œ/usr/local/lib/python2.7/dist-packages/pip/_internal/index.py”, line 14, in
from pip._vendor import html5lib, requests, six
File β€œ/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/init.py”, line 97, in
from pip._vendor.urllib3.contrib import pyopenssl
File β€œ/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/contrib/pyopenssl.py”, line 46, in
import OpenSSL.SSL
File β€œ/usr/lib/python2.7/dist-packages/OpenSSL/init.py”, line 8, in
from OpenSSL import rand, crypto, SSL
File β€œ/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py”, line 118, in
SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: β€˜module’ object has no attribute β€˜SSL_ST_INIT’
Traceback (most recent call last):
File β€œinstall.py”, line 420, in
install_bench(args)
File β€œinstall.py”, line 58, in install_bench
β€˜pip’: β€œsudo pip install --upgrade urllib3 requests cryptography ansible”
File β€œinstall.py”, line 234, in run_os_command
returncode = subprocess.check_call(command, shell=True)
File β€œ/usr/lib/python2.7/subprocess.py”, line 541, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command β€˜sudo pip install --upgrade urllib3 requests cryptography ansible’ returned non-zero exit status 1

Solution:
Use the command: sudo python -m easy_install --upgrade pyOpenSSL
Then try to install again. It works now.

1 Like