Bazaar has stopped working in Cygwin, for me at least. Why and how to fix?

Asked by Tom Jones on 2020-06-18

I've been using Bazaar in Cygwin for several years, and after installing the latest Cygwin, I can no longer use Bazaar. Therefore, I'm unable to access any of the past versions of my development source code, which is a huge problem for me. Here's what I get when I try to use Bazaar in Cygwin now:

~$ bzr
-bash: /usr/bin/bzr: /bin/python: bad interpreter: No such file or directory

Here are the Cygwin modules I've installed (along with the modules installed by Cygwin by default):

setup-x86_64.exe -P bzr,emacs-w32,aspell,aspell-en,gcc-core,gcc-fortran,python37,python37-pip,python37-numpy,octave,python38,python38-pip

Please guide me through the fix? I don't want to accept that I've lost years of development work on unfinished projects.

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
Ronald Blaschke
Solved:
2020-06-19
Last query:
2020-06-19
Last reply:
2020-06-18
John A Meinel (jameinel) said : #1

Bazaar doesn't support python3, it only supports python2.7. I'm guessing
Cygwin removed python2 since it is no longer supported.

For a version of Bazaar that supports Python3, I would look at Breezy,
which is a community fork.

On Thu, Jun 18, 2020 at 9:01 AM Tom Jones <
<email address hidden>> wrote:

> New question #691381 on Bazaar:
> https://answers.launchpad.net/bzr/+question/691381
>
> I've been using Bazaar in Cygwin for several years, and after installing
> the latest Cygwin, I can no longer use Bazaar. Therefore, I'm unable to
> access any of the past versions of my development source code, which is a
> huge problem for me. Here's what I get when I try to use Bazaar in Cygwin
> now:
>
> ~$ bzr
> -bash: /usr/bin/bzr: /bin/python: bad interpreter: No such file or
> directory
>
> Here are the Cygwin modules I've installed (along with the modules
> installed by Cygwin by default):
>
> setup-x86_64.exe -P
> bzr,emacs-w32,aspell,aspell-en,gcc-core,gcc-fortran,python37,python37-pip,python37-numpy,octave,python38,python38-pip
>
> Please guide me through the fix? I don't want to accept that I've lost
> years of development work on unfinished projects.
>
> --
> You received this question notification because you are an answer
> contact for Bazaar.
>

Thanks J.A.M., that sounds reasonable, but data I'd neglected to post shows otherwise, I believe. cygcheck -c, which shows installed Cygwin packages (which I called modules earlier, maybe mistakenly) beginning with "python" :

~/dev/reverb$ cygcheck -c
Cygwin Package Information
Package Version Status
...
python-pip-wheel 19.2.3-1 OK
python-setuptools-wheel 41.2.0-1 OK
python2 2.7.18-1 OK
python37 3.7.7-1 OK
python37-numpy 1.16.2-1 OK
python37-pip 20.1.1-1 OK
python37-setuptools 46.4.0-1 OK
python38 3.8.3-1 OK
python38-pip 20.1.1-1 OK
python38-setuptools 46.4.0-1 OK
...

and my bin directory indicates otherwise to:

~/dev/reverb$ ls -l /bin
total 475464
...
lrwxrwxrwx 1 pafh2 pafh2 13 Jun 16 21:58 python -> python2.7.exe
lrwxrwxrwx 1 pafh2 pafh2 13 Jun 16 21:58 python2 -> python2.7.exe
lrwxrwxrwx 1 pafh2 pafh2 14 Jun 16 21:58 python3.7 -> python3.7m.exe
-rwxr-xr-x 1 pafh2 pafh2 9235 Apr 9 23:17 python3.7m.exe
-rwxr-xr-x 1 pafh2 pafh2 9235 May 23 06:57 python3.8.exe
...

I am no Unix expert, but this looks like a possible clue?

~/dev/reverb$ which python
which: no python in (/usr/local/bin:/usr/bin:/cygdrive/c/Program Files (x86)/Intel/iCLS Client:/cygdrive/c/Program Files/Intel/iCLS Client:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/WINDOWS/System32/OpenSSH:/cygdrive/c/Program Files/Intel/WiFi/bin:/cygdrive/c/Program Files/Common Files/Intel/WirelessCommon:/cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/cygdrive/c/Users/pafh2/AppData/Local/Microsoft/WindowsApps:/cygdrive/c/Program Files/Maple 2018/bin.X86_64_WINDOWS:/usr/lib/lapack:.:/cygdrive/c/Program Files/Wolfram Research/Mathematica/11.1)

~/dev/reverb$ which python2
which: no python2 in (/usr/local/bin:/usr/bin:/cygdrive/c/Program Files (x86)/Intel/iCLS Client:/cygdrive/c/Program Files/Intel/iCLS Client:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/WINDOWS/System32/OpenSSH:/cygdrive/c/Program Files/Intel/WiFi/bin:/cygdrive/c/Program Files/Common Files/Intel/WirelessCommon:/cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/cygdrive/c/Users/pafh2/AppData/Local/Microsoft/WindowsApps:/cygdrive/c/Program Files/Maple 2018/bin.X86_64_WINDOWS:/usr/lib/lapack:.:/cygdrive/c/Program Files/Wolfram Research/Mathematica/11.1)

~/dev/reverb$ which python2.7
which: no python2.7 in (/usr/local/bin:/usr/bin:/cygdrive/c/Program Files (x86)/Intel/iCLS Client:/cygdrive/c/Program Files/Intel/iCLS Client:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/WINDOWS/System32/OpenSSH:/cygdrive/c/Program Files/Intel/WiFi/bin:/cygdrive/c/Program Files/Common Files/Intel/WirelessCommon:/cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/cygdrive/c/Users/pafh2/AppData/Local/Microsoft/WindowsApps:/cygdrive/c/Program Files/Maple 2018/bin.X86_64_WINDOWS:/usr/lib/lapack:.:/cygdrive/c/Program Files/Wolfram Research/Mathematica/11.1)

~/dev/reverb$

Manfred Hampl (m-hampl) said : #4

What output do you receive for the command

/bin/python

Best Ronald Blaschke (rblasch) said : #5

I think there may be an issue with the bzr package dependencies. Try installing the Cygwin package "python27".

M.H., Thanks for your inquiry.

====================
~/dev/reverb$ /bin/python
-bash: /bin/python: No such file or directory

~/dev/reverb$
====================

R.B.,

In the Cygwin installer, I observe that Package "python2" is already installed, with a Current column that reads "2.7.18-1" and a Size column that reads "1k".

I observe further that Package "python27" is *not* installed (evidently omitted from the Cygwin defaults and also from the dependencies for Bazaar), and per your suggestion, I've set the Cygwin installer to install the latest version of Package "python27", which version is "2.7.18-1" and whose size is "4,308k".

... And following the install, I get:

======================
~/dev/reverb$ bzr
Bazaar 2.8.0dev1 -- a free distributed version-control tool
http://bazaar.canonical.com/

Basic commands:
  bzr init makes this directory a versioned branch
  bzr branch make a copy of another branch

  bzr add make files or directories versioned
  bzr ignore ignore a file or pattern
  bzr mv move or rename a versioned file

  bzr status summarize changes in working copy
  bzr diff show detailed diffs

  bzr merge pull in changes from another branch
  bzr commit save some or all changes
  bzr send send changes via email

  bzr log show history of changes
  bzr check validate storage

  bzr help init more help on e.g. init command
  bzr help commands list all commands
  bzr help topics list all help topics

~/dev/reverb$ bzr ci -m "Misc."
Committing to: /cygdrive/c/Users/pafh2/OneDrive/dev/reverb/
modified canon.py
modified covid19DataAndAnalysis.py
modified covid19Graphics.py
modified maple.mpl
modified music2.py
Committed revision 5610.

~/dev/reverb$
======================

Oh my lord, what a relief. That was one of the most unnerving technical problems I'd encountered recently---worse than my recent C:-drive catastrophic failure. Thanks a million, and also to the others here who helped me move towards the solution.

I'll try to contact the Cygwin developers and provide them with a link to this discussion.

P.S.

To the Bazaar developers: Thanks for this program. I first tried about five other version-control options, including Git, and found that for me as a one-man developer, Bazaar was easiest to learn and use.

Thanks Ronald Blaschke, that solved my question.