Easy Install on Ubuntu 16.04.5

I have this error while using easy install on Ubuntu 16.04 64 bit on vultr

TASK [bench : python2 bench init for production] ***************************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["bench", "init", "/home/frappe/frappe-bench", "--frappe-path", "https://github.com/frappe/frappe", "--frappe-branch", "master"], "delta": "0:01:34.961202", "end": "2018-10-17 07:59:05.184094", "msg": "non-zero return code", "rc": 1, "start": "2018-10-17 07:57:30.222892", "stderr": "INFO:bench.utils:virtualenv -q env -p /usr/bin/python\nINFO:bench.utils:env/bin/pip -q install --upgrade pip\nINFO:bench.utils:env/bin/pip -q install wheel\nINFO:bench.utils:env/bin/pip -q install six\nINFO:bench.utils:env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit\nINFO:bench.app:getting app frappe\nINFO:bench.utils:git clone https://github.com/frappe/frappe --branch master  --origin upstream\nCloning into 'frappe'...\nINFO:bench.app:installing frappe\nINFO:bench.utils:/home/frappe/frappe-bench/env/bin/pip install -q  -e /home/frappe/frappe-bench/apps/frappe --no-cache-dir\nrequests 2.19.1 has requirement urllib3<1.24,>=1.21.1, but you'll have urllib3 1.24 which is incompatible.\nbotocore 1.12.25 has requirement urllib3<1.24,>=1.20, but you'll have urllib3 1.24 which is incompatible.\nINFO:bench.app:getting app frappe_io\nINFO:bench.utils:git clone https://github.com/frappe/frappe_io --branch master  --origin upstream\nCloning into 'frappe_io'...\nINFO:bench.app:installing frappe_io\nINFO:bench.utils:/home/frappe/frappe-bench/env/bin/pip install -q  -e /home/frappe/frappe-bench/apps/frappe_io --no-cache-dir\nINFO:bench.utils:npm install\nnpm notice created a lockfile as package-lock.json. You should commit this file.\nnpm WARN frappe@ No description\nnpm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):\nnpm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {\"os\":\"darwin\",\"arch\":\"any\"} (current: {\"os\":\"linux\",\"arch\":\"x64\"})\n\n/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.24) or chardet (3.0.4) doesn't match a supported version!\n  RequestsDependencyWarning)\n/home/frappe/frappe-bench/env/bin/python: No module named ordered_dict", "stderr_lines": ["INFO:bench.utils:virtualenv -q env -p /usr/bin/python", "INFO:bench.utils:env/bin/pip -q install --upgrade pip", "INFO:bench.utils:env/bin/pip -q install wheel", "INFO:bench.utils:env/bin/pip -q install six", "INFO:bench.utils:env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit", "INFO:bench.app:getting app frappe", "INFO:bench.utils:git clone https://github.com/frappe/frappe --branch master  --origin upstream", "Cloning into 'frappe'...", "INFO:bench.app:installing frappe", "INFO:bench.utils:/home/frappe/frappe-bench/env/bin/pip install -q  -e /home/frappe/frappe-bench/apps/frappe --no-cache-dir", "requests 2.19.1 has requirement urllib3<1.24,>=1.21.1, but you'll have urllib3 1.24 which is incompatible.", "botocore 1.12.25 has requirement urllib3<1.24,>=1.20, but you'll have urllib3 1.24 which is incompatible.", "INFO:bench.app:getting app frappe_io", "INFO:bench.utils:git clone https://github.com/frappe/frappe_io --branch master  --origin upstream", "Cloning into 'frappe_io'...", "INFO:bench.app:installing frappe_io", "INFO:bench.utils:/home/frappe/frappe-bench/env/bin/pip install -q  -e /home/frappe/frappe-bench/apps/frappe_io --no-cache-dir", "INFO:bench.utils:npm install", "npm notice created a lockfile as package-lock.json. You should commit this file.", "npm WARN frappe@ No description", "npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):", "npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {\"os\":\"darwin\",\"arch\":\"any\"} (current: {\"os\":\"linux\",\"arch\":\"x64\"})", "", "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.24) or chardet (3.0.4) doesn't match a supported version!", "  RequestsDependencyWarning)", "/home/frappe/frappe-bench/env/bin/python: No module named ordered_dict"], "stdout": "Already using interpreter /usr/bin/python\n\n> chromedriver@2.42.1 install /home/frappe/frappe-bench/node_modules/chromedriver\n> node install.js\n\nDownloading https://chromedriver.storage.googleapis.com/2.42/chromedriver_linux64.zip\nSaving to /tmp/chromedriver/chromedriver_linux64.zip\nReceived 781K...\nReceived 1568K...\nReceived 2352K...\nReceived 3136K...\nReceived 3920K...\nReceived 3944K total.\nExtracting zip contents\nCopying to target path /home/frappe/frappe-bench/node_modules/chromedriver/lib/chromedriver\nFixing file permissions\nDone. ChromeDriver binary available at /home/frappe/frappe-bench/node_modules/chromedriver/lib/chromedriver/chromedriver\nadded 480 packages from 269 contributors and audited 3531 packages in 15.738s\nfound 0 vulnerabilities\n\n('installing', u'frappe')\n('installing', u'frappe_io')\nUpdating node packages...", "stdout_lines": ["Already using interpreter /usr/bin/python", "", "> chromedriver@2.42.1 install /home/frappe/frappe-bench/node_modules/chromedriver", "> node install.js", "", "Downloading https://chromedriver.storage.googleapis.com/2.42/chromedriver_linux64.zip", "Saving to /tmp/chromedriver/chromedriver_linux64.zip", "Received 781K...", "Received 1568K...", "Received 2352K...", "Received 3136K...", "Received 3920K...", "Received 3944K total.", "Extracting zip contents", "Copying to target path /home/frappe/frappe-bench/node_modules/chromedriver/lib/chromedriver", "Fixing file permissions", "Done. ChromeDriver binary available at /home/frappe/frappe-bench/node_modules/chromedriver/lib/chromedriver/chromedriver", "added 480 packages from 269 contributors and audited 3531 packages in 15.738s", "found 0 vulnerabilities", "", "('installing', u'frappe')", "('installing', u'frappe_io')", "Updating node packages..."]}
    to retry, use: --limit @/tmp/.bench/playbooks/site.retry

PLAY RECAP *****************************************************************************************
localhost                  : ok=72   changed=46   unreachable=0    failed=1

Traceback (most recent call last):
  File "install.py", line 420, in <module>
install_bench(args)
  File "install.py", line 122, in install_bench
run_playbook('site.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 338, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, 'playbooks'))
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'site.yml', '-e', '@/tmp/extra_vars.json', '--become', '--become-user=frappe']' returned non-zero exit status 2

what I did using root was:

apt-get update && sudo apt-get dist-upgrade
apt-get install python-minimal
wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
python install.py --production --user frappe

Hi @AbdalAliy

Can you confirm if you also installed setup tools?

apt-get install build-essential python-setuptools

Kind regards,

yes, I forgot to put that line above, it was needed for one of the import statement

the error is still there

what sort of machine (bare metal, VM, Container) are you using for the installation @AbdalAliy?

I have the same problem inside a LXD Container and thus far have have been told it was a specific issue with how container handles localectl commands and now I am curious about your environment. Here is the related Topic for reference

Hi @vrms

Not sure it’s the same issue. The error here seems related to the version of urllib that was installed

@AbdalAliy could you try manually installing a compatible version of urllib?

I would advise you first uninstall the existing urllib package so that there aren’t any conflicts

pip uninstall urllib3

After that, install a compatible version. For instance, try the command below:

pip install urllib3==1.23

After that, try the installation again and let’s see if that fixes the issue

Cheers

I updated my last comment with a suggestion to first uninstall the existing package

All the best!