0

Good day everyone. I'm the beginner in learning Python. I made script with import of pyperclip module. When I run this script in Spyder IDE, everything is OK. When I start this script from terminal, it is also OK. But when I'm trying to make .desktop file to run this script from dash menu,then terminal returns me the error "pyperclip module not found". I can't understand this, because I've installed this pyperclip module successfully and I can use it in IDE. I'm using Linux Mint 20, if it is important.

Trying to run Python script with pyperclip module using .desktop file in Linux Mint. This script works normally in IDE and from terminal I expected that it it would be working normally if I started this from .desktop file. But it gives me error "pyperclip module not found".

  • Just a guess: In your IDE, you are using a different python environment then globally on your OS? Which could mean, that you need to install your requirements first? Did you follow this guide? https://linuxhint.com/run-python-script-desktop-icon-linux/ – Christoph Fischer Dec 05 '22 at 11:12
  • Yes, I followed this guide. I alos thought about different python enviroment, but how it could be possible?I installed Python just once, from terminal using sudoapt command. If I check python version through terminal it gives me only one version Python 3.9.13 – Ivan Safronov Dec 05 '22 at 16:39
  • Yes, that is your global python installation. But it could be that your IDE will create a virtual env automatically. How did you install pyperclip? – Christoph Fischer Dec 05 '22 at 16:43
  • Same way,using instruction "sudo apt install python-pyperclip" in terminal. – Ivan Safronov Dec 05 '22 at 19:49
  • Did you try running ? – Christoph Fischer Dec 06 '22 at 09:52
  • I have tried just now, it gave me – Ivan Safronov Dec 06 '22 at 12:28

0 Answers0