14

I just installed Ubuntu 22.04 and I have been trying to install Mendeley through its .deb installer and the .tar.bz2, but in both cases it throws me a problem with the dependencies:

/usr/bin/env: "python": No such file or directory

I really liked the experience with the new version of Ubuntu and I would not like to go back, but Mendeley is a program that I use a lot due to my work.

I would appreciate any help!

7
  • Did you resolve this issue?
    – Just_Alex
    May 17, 2022 at 1:48
  • Same question as @Just_Alex
    – Natan
    Jan 31, 2023 at 19:25
  • 1
    @Natan The solutions below work but do not allow referencing in libreoffice. Eventually I moved to zotero. I use mendeley in the browser to capture references and periodically sync it to zotero. I hope this helps.
    – Just_Alex
    Feb 1, 2023 at 12:03
  • @Natan, I'm not sure I can post it here, but on github you can find a script to do what the answers below suggest (i.e., repackage mendeley) completely effortless :)
    – poomerang
    Feb 1, 2023 at 16:14
  • This question is no longer relevant, since Mendeley Desktop is no longer available for download and installation. Feb 11, 2023 at 12:59

9 Answers 9

10

When installing Mendeley on Ubuntu 22.04 I was met with the following error:

dpkg: dependency problems prevent configuration of mendeleydesktop:
 mendeleydesktop depends on python; however:
  Package python is not installed.

The following solution worked for me:

  1. Check that the command python executes Python properly. If you don't have the python command, then please install python-is-python3.

NOTE: If the version of Python is 2.xx then you can skip steps 2 and 4.

  1. Unpack the .deb file, remove "python" from its dependencies, and then repack it. I followed the instructions in @Janus Troelsen's answer in How do I get apt-get to ignore some dependencies?. So modify the third line in the control file from:

    Depends: libc6, python, gconf2, desktop-file-utils
    

    to:

    Depends: libc6, gconf2, desktop-file-utils
    
  2. And then make a softlink /usr/bin/python to indicate python2:

    cd /usr/bin
    sudo mv python python_old
    sudo ln -s python2 python
    
  3. Install Mendeley with the repacked .deb file without errors (I hope).

  4. Restore /usr/bin/python as before:

    sudo rm python
    sudo mv python_old python
    

I hope my answer is helpful for others in the same situation.

9
  • 1
    This worked perfectly for me. Thanks!
    – pfuhlert
    May 23, 2022 at 10:43
  • Can someone make this deb file available?
    – Just_Alex
    May 24, 2022 at 1:18
  • It works, but does not close. Prompting ERROR:service_manager_context.cc(171)
    – Just_Alex
    May 24, 2022 at 1:41
  • The libre-writer citation plugin still causes freezing.
    – Just_Alex
    May 24, 2022 at 5:52
  • @Just_Alex I felt the same error too, however, I don't know how to resolve this issue yet. It seems like that the error is related to Qt but no ideas more than this. I'll share information if I find a solution.
    – philip
    May 24, 2022 at 10:35
2

Maybe this is not such a good idea; I run Mendeley Desktop and it keeps using 12.5% of my CPU power (I have eight processors). I don't know why, maybe it's mining Bitcoin.


An easier solution is to install with the generic Linux installer, see Holger_Gehrke's answer.

  1. Download the generic linux installer and extract in your $HOME folder.
  2. Run python3 mendeleydesktop-1.19.8-linux-x86_64/bin/mendeleydesktop.
  3. You can isnstall with bash mendeleydesktop-1.19.8-linux-x86_64/bin/install-mendeley-link-handler.sh ~/mendeleydesktop-1.19.8-linux-x86_64/
  4. To start Mendeley Desktop I hit win-D and then start typing mendeley.
1
  • thanks it is working
    – Qudor Eng
    Oct 16, 2022 at 9:57
1

The command python is not installed by default on Ubuntu 22.04. Install python-is-python3 to have a symlink python that points to python3, and then it is hoped that application works well with the current python version, because Python 2 is not anymore supported on Ubuntu.

1

What worked for me was installing the desktop version trough a flatpak

flatpak install flathub com.elsevier.MendeleyDesktop 
flatpak run com.elsevier.MendeleyDesktop

Downloading and installing it directly from flathub site works fine. I was not able to solve the "python" missing package (and dependences) problem, but this is an acceptable workaround. Since there won´t be a desktop version in the future I dont know if this will be working so far.

2
  • Unfortunately by running this via flatpak I get a very high CPU usage
    – lefterav
    Nov 18, 2022 at 16:26
  • 1
    it seems like mendeley has been removed from flatpak
    – Natan
    Jan 31, 2023 at 19:28
1

Installing python-is-python3 worked perfectly. But before creating the symlink, you need to uninstall Mendeley. If you keep it installed (even though it is not working), it will mess up the python-is-python3 installation.

Steps:

  1. Uninstall medeleydesktop:

    sudo apt-get remove mendeleydesktop
    
  2. Install python-is-python3:

    sudo apt-get install python-is-python3 -y
    
  3. Then install Mendeley again:

    sudo dpkg -i <package_path>
    

    where <package_path> is the path to Mendeley .deb file.

2
  • 4
    This does not resolve the issue. Tried both ppa and .deb file.
    – Just_Alex
    May 17, 2022 at 1:47
  • Unfortunately, I'm still getting the error. Jan 13, 2023 at 1:19
0

I had this same problem and followed the instructions just to discuss that Mendeley Desktop doesn't link to academic accounts. I tried Mendeley Reference Manager and the installation worked straight away and as I want. I'm guessing the desktop version is old now.

0

I came across this question after trying the new web-based Mendeley reference manager and becoming frustrated with its lack of features compared to the older desktop version.

I ended relying on Docker to install Mendeley Desktop 1.19.8 on my machine, using the image from this github repository: Mendeley-Docker.

In a nutshell:

# Make sure docker is installed
docker run hello-world

# Clone repository
git clone https://github.com/javadr/mendeley-docker
cd mendeley-docker

# Build image
./build.sh

# Run image
./run.sh

It worked like a charm for me!

0

It seems like Python is only required for the install. And it requires Python 2, because there are some statements like print "bla" in the install code.

So you need to do two simple steps:

  1. make Python 2 your default python, for instance:
sudo apt-get install python2
sudo ln -sf /usr/bin/python2 /usr/bin/python
python --version
> Python 2.7.18
  1. Install mendeley, but without python dependency (I don't know why that is necessary, but it was for me):
sudo dpkg --ignore-depends=python -i Downloads/mendeleydesktop_1.19.8-stable_amd64.deb

That's it. You probably want to remove the symlink to Python2 again.

-1

@Just_Alex your solution to repackage after removing python dependency worked for me. Thanks! But it did later complain that it could not find gconf2.

I was able to fix that by first running:

 sudo apt --fix-broken install

And then installing the repackaged file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .