"Easy Install" for v10 no longer works. Fails every time w/same error-multiple OS

Specific to v10, I found that downgrading pip to v9 sometimes helped

python -m pip install --user pip==9.0.3

How would I do that? After the error and then re-run the install.py?

Wouldn’t the install.py just overwrite pip with the newest version?

How might I use your idea to try to correct a failed install?

BKM

Ok, I tried your ‘pip downgrade’ fix after the initial failure to install and then re-run the install.py script. It then fails even faster than the first pass with this error:

Traceback (most recent call last):
  File "/usr/local/bin/pip", line 6, in <module>
    from pip._internal import main
ImportError: No module named _internal

Still no luck with getting past the initial error.

BKM

Making changes to pip can be risky. I was doing something similar about 1 month ago. When I got the:
ImportError: No module named _internal

Quick resolution

  • Try editing /usr/local/bin/pip. You’ll need to sudo.
  • Replace “from pip._internal import main”, with “from pip import main”

Longer explanation
Your O/S (Debian, Ubuntu) usually ships with Python and Pip already installed.
However. Pip itself is not aware of your O/S packages. So, if you try to use pip commands to upgrade?

python -m pip install -U pip == 9.0.1

Your Debian/Ubuntu won’t know about the version change, and will still think you’re using the original pip.

Advice:
(1) When you use pip, and it tells you to upgrade? Don’t. This advice isn’t mine. It’s from the actual maintainers of pip. They recommend you only upgrade using “apt-get upgrade”. And never upgrade manually, unless you really know what you’re doing.

(2) Don’t sudo when upgrading pip.

(3) Try not to run multiple versions of pip (Ubuntu, manual Python2, manual Python3.6, manual Python 3.7 all together). It can be a huge pain.

(4) If you need to change pip or run different versions, do that in your Python virtual environment (virtualenv, or venv in Python 3.5+)

2 Likes

Ok, I will try that. But do you really mean to remove the period after pip to look like “from pip import main” or did you mean to leave the period in to be like “from pip.import main”

??

BKM

Ok, I tried this and got the same error as before. Her is how I did it:

  • On a fresh Ubuntu 18.04 lts server (completely updated)

  • Installed the prerequisites as explained HERE under “Easy Install”

  • Used the Easy Install command from @snv in THIS POST

  • When install script paused to ask for mairadb and admin passwords, I opened a new ssh window as root user and applied your edits to “pip”

  • Went back to original def_user ssh window and filled in passwords to allow script to continue.

  • Install fails again with what seems to be the same error as displayed here:
    TASK [bench : python2 bench init for production] *******************************
    fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: [“bench”, “init”, “/home/erp_jmi/frappe-bench”, “–frappe-path”, “https://github.com/frappe/frappe”, “–frappe-branch”, “v10.x.x”], “delta”: “0:00:47.706215”, “end”: “2019-04-15 19:46:08.698088”, “msg”: “non-zero return code”, “rc”: 1, “start”: “2019-04-15 19:45:20.991873”, “stderr”: “INFO:bench.utils:virtualenv -q env -p /usr/bin/python\nINFO:bench.utils:env/bin/pip -q install --upgrade pip\nDEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.\nINFO:bench.utils:env/bin/pip -q install wheel\nDEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.\nINFO:bench.utils:env/bin/pip -q install six\nDEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.\nINFO:bench.utils:env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit\nDEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.\nINFO:bench.app:getting app frappe\nINFO:bench.utils:git clone https://github.com/frappe/frappe --branch v10.x.x --origin upstream\nCloning into ‘frappe’…\nwarning: unable to access ‘/home/erp_jmi/.config/git/attributes’: Permission denied\nINFO:bench.app:installing frappe\nINFO:bench.utils:/home/erp_jmi/frappe-bench/env/bin/pip install -q -e /home/erp_jmi/frappe-bench/apps/frappe \nDEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.\n Could not find a version that satisfies the requirement croniter==0.3.26 (from frappe==10.1.71) (from versions: 0.1.4.macosx-10.5-i386, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.2.0, 0.2.2, 0.2.4, 0.2.5, 0.2.7, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9, 0.3.10, 0.3.11, 0.3.12, 0.3.13, 0.3.14, 0.3.15, 0.3.16, 0.3.17, 0.3.18, 0.3.19, 0.3.20, 0.3.22, 0.3.23, 0.3.24, 0.3.25, 0.3.28, 0.3.29)\nNo matching distribution found for croniter==0.3.26 (from frappe==10.1.71)\nTraceback (most recent call last):\n File “/usr/local/bin/bench”, line 11, in \n load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()\n File “/home/erp_jmi/.bench/bench/cli.py”, line 40, in cli\n bench_command()\n File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 764, in call\n return self.main(*args, **kwargs)\n File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 717, in main\n rv = self.invoke(ctx)\n File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1137, in invoke\n return _process_result(sub_ctx.command.invoke(sub_ctx))\n File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 956, in invoke\n return ctx.invoke(self.callback, **ctx.params)\n File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 555, in invoke\n return callback(*args, **kwargs)\n File “/home/erp_jmi/.bench/bench/commands/make.py”, line 30, in init\n python \t\t = python)\n File “/home/erp_jmi/.bench/bench/utils.py”, line 75, in init\n get_app(frappe_path, branch=frappe_branch, bench_path=path, build_asset_files=False, verbose=verbose)\n File “/home/erp_jmi/.bench/bench/app.py”, line 135, in get_app\n install_app(app=app_name, bench_path=bench_path, verbose=verbose)\n File “/home/erp_jmi/.bench/bench/app.py”, line 171, in install_app\n find_links=find_links))\n File “/home/erp_jmi/.bench/bench/utils.py”, line 159, in exec_cmd\n raise CommandFailedError(cmd)\nbench.utils.CommandFailedError: /home/erp_jmi/frappe-bench/env/bin/pip install -q -e /home/erp_jmi/frappe-bench/apps/frappe “, “stderr_lines”: [“INFO:bench.utils:virtualenv -q env -p /usr/bin/python”, “INFO:bench.utils:env/bin/pip -q install --upgrade pip”, “DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.”, “INFO:bench.utils:env/bin/pip -q install wheel”, “DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.”, “INFO:bench.utils:env/bin/pip -q install six”, “DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.”, “INFO:bench.utils:env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit”, “DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.”, “INFO:bench.app:getting app frappe”, “INFO:bench.utils:git clone https://github.com/frappe/frappe --branch v10.x.x --origin upstream”, “Cloning into ‘frappe’…”, “warning: unable to access ‘/home/erp_jmi/.config/git/attributes’: Permission denied”, “INFO:bench.app:installing frappe”, “INFO:bench.utils:/home/erp_jmi/frappe-bench/env/bin/pip install -q -e /home/erp_jmi/frappe-bench/apps/frappe “, “DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.”, " Could not find a version that satisfies the requirement croniter==0.3.26 (from frappe==10.1.71) (from versions: 0.1.4.macosx-10.5-i386, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.2.0, 0.2.2, 0.2.4, 0.2.5, 0.2.7, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9, 0.3.10, 0.3.11, 0.3.12, 0.3.13, 0.3.14, 0.3.15, 0.3.16, 0.3.17, 0.3.18, 0.3.19, 0.3.20, 0.3.22, 0.3.23, 0.3.24, 0.3.25, 0.3.28, 0.3.29)”, “No matching distribution found for croniter==0.3.26 (from frappe==10.1.71)”, “Traceback (most recent call last):”, " File “/usr/local/bin/bench”, line 11, in “, " load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()”, " File “/home/erp_jmi/.bench/bench/cli.py”, line 40, in cli”, " bench_command()”, " File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 764, in call”, " return self.main(*args, **kwargs)", " File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 717, in main", " rv = self.invoke(ctx)", " File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1137, in invoke", " return _process_result(sub_ctx.command.invoke(sub_ctx))", " File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 956, in invoke", " return ctx.invoke(self.callback, **ctx.params)", " File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 555, in invoke", " return callback(*args, **kwargs)", " File “/home/erp_jmi/.bench/bench/commands/make.py”, line 30, in init", " python \t\t = python)", " File “/home/erp_jmi/.bench/bench/utils.py”, line 75, in init", " get_app(frappe_path, branch=frappe_branch, bench_path=path, build_asset_files=False, verbose=verbose)", " File “/home/erp_jmi/.bench/bench/app.py”, line 135, in get_app", " install_app(app=app_name, bench_path=bench_path, verbose=verbose)", " File “/home/erp_jmi/.bench/bench/app.py”, line 171, in install_app", " find_links=find_links))", " File “/home/erp_jmi/.bench/bench/utils.py”, line 159, in exec_cmd", " raise CommandFailedError(cmd)", "bench.utils.CommandFailedError: /home/erp_jmi/frappe-bench/env/bin/pip install -q -e /home/erp_jmi/frappe-bench/apps/frappe "], “stdout”: “Already using interpreter /usr/bin/python\nwarning: unable to access ‘/home/erp_jmi/.config/git/attributes’: Permission denied\n(‘installing’, u’frappe’)”, “stdout_lines”: [“Already using interpreter /usr/bin/python”, “warning: unable to access ‘/home/erp_jmi/.config/git/attributes’: Permission denied”, “(‘installing’, u’frappe’)”]}
    to retry, use: --limit @/tmp/.bench/playbooks/site.retry

    PLAY RECAP *********************************************************************
    localhost : ok=68 changed=42 unreachable=0 failed=1

    Traceback (most recent call last):
    File “install.py”, line 425, in
    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 190, in check_call
    raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=erp_jmi’]’ returned non-zero exit status 2

.
.

It appears the editing of “pip” didn’t really make a difference.

The reason I took the 2 ssh window approach is that pip is not installed with the OS and is in fact installed by the early part of the install.py script. So, the natural pause in the script for the passwords was the ideal place to edit ‘pip’ (but it didn’t help). :frowning_face:

BKM

That is a rat’s nest of shell output. The easy install script should be edited, to disable all those repeated warning messages about Python 2.7.

As far as I can tell, the real showstopper is this:
Could not find a version that satisfies the requirement croniter==0.3.26 (from frappe==10.1.71).

Here’s the link to croniter. Appears that version 0.3.26 is not available. It skips from minor version 25 to minor version 29.

So perhaps a bug in the easy install script? Someone meant to type 29 but typed 26? I don’t know. I haven’t touched easy install in 2+ years. I’m not a fan.

Well, the ‘Easy Install’ script is the only way I am able to start up my production servers, so myself and a bunch of other general users are locked out until it gets fixed. That sux. :disappointed:

BKM

I’m just guessing. I’ll try to find the script, and take a look.

Here’s what bothers me, though. You’re installing version 10, which is an older version. So.

  1. Your install.py should be fetched from the 10.x.x branch.
  2. If so, that branch and install.py shouldn’t be modified. Why did it suddenly change/break?

I don’t have answers. I’m hoping one of the maintainers does, though.

edit: Well, just answered my own question. Bench doesn’t have the same versions as Frappe and ERPNext. There is no 10.x.x.

Appears to be a situation where Croniter version 0.3.26 was pulled from PyPi. I’ve edited requirements.txt, and submitted a pull request.

We just need a Maintainer to review my request, and update 10.x.x. And you’ll be back in business.

~Brian

1 Like

Awesome cool Brian! :star_struck:

Thanks. Hopefully they get to it in the next day or so and I can go back to building servers.

And you are right, v10 is old, but it is the only stable version to work with for now until all of the permissions issues are worked out of v11.

BKM

Oh, there’s nothing wrong with using version 10. You’re right, it’s the stable and dependable one.

That’s why I was surprised your installation broke. No one should be editing version 10.x.x code anymore.

And we didn’t. The installation failure is because of PyPi and croniter, not Frappe or ERPNext.

1 Like

This problem appears to be fixed with the PR submitted by @brian_pond and merged last night.

Now if we could only get someone to pay attention to the missing print formats in v10 we could possibly make it a usable stable version again. Currently it installs, but it is still unusable due to the missing Standard Print Formats. You are unable to print important things like Sales Invoices, Purchase Orders, POS Receipts, etc.

That kind of makes it only usable to developers and no longer functional to users.

Thanks @brian_pond for getting us this far.

BKM

You’re quite welcome.

So…what’s up with these missing print formats? Can you link me to the other forum thread on this topic? Are they only broken in v10, or also v11/12?

Edit: Scratch that. I see your threads, and will do some reading.

1 Like

Does a manual installed v10 production have the missing print formats?

I have never done a successful manual install before. I am not sure how to go about it.

I am sure it would be even more specialized since it is for v10 which requires special switches in order to even use the Easy Install method. If someone has a link to the instructions specific to manually installing v10 now that it is not the active version, then please pass it along I will give it a try.

BKM

The.ova from the website still has v10.1.18 as the starting version if that could be used as a substitute. The Ubuntu VM is 16.04. The print formats appear to be intact.

What is the .ova? Not familiar with that. Would that be something like a docker image?
How would one use this .ova? Can you point to more details so I can read up on it?

BKM

ova , short for Open Virtual Appliance is a self contained image with the OS and app installed and ready to use. I have used the ERPNext one with Virtualbox and it has worked well. Here’s the link to thedownload page. I have Virtualbox installed on a Debian 9, 10, NixOs and Ubuntu hosts. Once installed I sinply import the ERPNext appliance and login to localhost:8080 on the host computer. Installation to a VSP or remote server requires forwarding the appropriate ports, a topic that has been discussed here in the past.

just edit the /apps/frappe/requirements.txt file and edit croniter==0.3.26 to croniter==0.3.29

1 Like