ppizarror / PyDetex

An application that transforms LaTeX code to plain text
https://pydetex.readthedocs.io/
MIT License
38 stars 5 forks source link

Pyperclip not recognized. #43

Open pauloney opened 3 months ago

pauloney commented 3 months ago

Running the command from a shell, I get:

$ python3 -m pydetex.gui
/usr/local/lib/python3.8/dist-packages/pydetex/gui.py:246: UserWarning: pyperclip is not available on your system (copy/paste mechanism). GUI buttons were disabled
  warn(error)

Even though pyperclip seems to be installed fine, and Copy & Paste inside the GUI works fine.

$ locate pyperclip
/usr/lib/python3/dist-packages/prompt_toolkit/clipboard/pyperclip.py

Indeed the two buttons at the bottom of the window are disabled.

If I execute:

python3 -m pip show pyperclip 

It recognizes pyperclip as installed, no problems.

ppizarror commented 3 months ago

Hi, I guess that Pydetex cannot import the library. If you look at the path, python3 relies on lib/python3.8/dist-packages/... whereas paperclip is on lib/python3/dist-packages. This error happens while trying to execute pyperclip.paste()

https://github.com/ppizarror/PyDetex/blob/3b93bc938f8c426d10b39559019b8bdeecd93527/pydetex/gui.py#L239-L248