1

I've freshly installed Ubuntu 18.04 and have decided to try Anaconda. However, when I then try to install Mendeley, I get the following error:

mendeleydesktop depends on python; however:
  Package python is not installed.

I assume the issue here is that python is now in ~\anaconda2\bin, instead of \usr\bin. I'm not certain what I should do. As I see it, I have 3 options:

  1. Install a system python into \usr\bin, but this seems sloppy/messy
  2. Put a softlink in \usr\bin along the lines of ln -s python ~\anaconda2\bin\python, but I'm worried that there might be implications to that, which I don't understand
  3. Somehow tell the mendeley.deb file where the python I'm using is, but I don't know how to do this.

Are either 1 or 2 reasonable options? If not how do I implement my 3rd option, or what else should I do?

Empirically found option 2 does not work. dpkg is still looking for the installation of the python package

user1245262
  • 6,968
  • 8
  • 50
  • 77
  • 1 is certainly the most reasonable option. Ubuntu itself depends on there being `/usr/bin/python` available to run scripts that manage the OS. Did Ubuntu not come with a Python there, or did you remove it? – darthbith Oct 10 '18 at 01:14
  • @darthbith - My Ubuntu came with python3. Option 1 is what I ended up using. Thx for letting me know it's reasonable. – user1245262 Oct 15 '18 at 15:54

1 Answers1

1

You can use the method given here to remove the system python dependency in the .deb file; I tried this and mendeley seems to install as normal. Assuming your conda environment is set up correctly, it will work. I had to modify the instructions on that page slightly:

  • Unpack deb: $ ar x mendeleydesktop_1.19.4-stable_amd64.deb (will create i.e. three files: debian-binary control.tar.gz data.tar.gz)
  • Unpack control archive: $ tar xzf control.tar.gz (will create: postinst control)
  • Fix dependencies in control (use a text editor)
  • Repack control.tar.gz: $ tar c postinst control | gzip -c > control.tar.gz
  • Repack deb: $ ar rcs mendeleydesktop_1.19.4-stable_amd64_nopythondep.deb debian-binary control.tar.gz data.tar.gz (order important! dpkg wouldn't be able to read the metadata of a package quickly if it had to search for where the data section ended!)
Al Nejati
  • 11
  • 1