Python pyperclip Error on Ubuntu

힘센캥거루
2025년 10월 8일(수정됨)
1
16

I kept encountering errors trying to use pyperclip on Ubuntu.

After multiple attempts at crawling, nothing worked, leading to unnecessary dependency installations.

By chance, I found the solution on the official website.

Below is the pip guide for pyperclip.

Python pyperclip Error on Ubuntu-1

After reading the content, it says to install one of xclip, xsel, or PyQt4.

PyQt4 didn't work, but installing xclip allowed the program to run smoothly.

So, copy and paste the code below.

For reference, use pip3 to install pyperclip, as shown in the image above.

sudo apt-get install xclip

If there are any incorrectly installed modules, you can remove them cleanly with the remove, purge, and autoremove commands.

# To remove a module: apt-get remove
sudo apt-get remove "module name"

# To remove a module and its configuration: apt-get purge
sudo apt-get purge "module name"

 # Remove unused dependencies sudo apt-get autoremove

Ubuntu can be difficult to handle, but it's fun to solve issues one by one like this. That's it.

관련 글

Automating School Work – Using AI to Check Subject-Specific Remarks in Student Records
Automating School Work – Using AI to Check Subject-Specific Remarks in Student Records
If I had to pick the most meaningless, exhausting, and boring task at school, I would choose checking student records.In middle school, the student re...
Book Review and Challenge Review of Chapter 7 of *Building an LLM from Scratch*
Book Review and Challenge Review of Chapter 7 of *Building an LLM from Scratch*
Chapter 7 covers the process of fine-tuning a model to follow instructions.In other words, making it give the desired response to a given question.As...
Review of Chapter 6 of *Build an LLM from Scratch*
Review of Chapter 6 of *Build an LLM from Scratch*
Chapter 6 is about fine-tuning for classification.The example used is building a spam classifier.A spam classifier determines whether something is spa...
Review of Chapter 5 of *Building an LLM from Scratch*
Review of Chapter 5 of *Building an LLM from Scratch*
Today is December 14.The challenge period actually ended two weeks ago, but I couldn’t just give up on writing a review.Because these TILs I leave lik...
Impressions After Reading Chapter 4 of “LLM From Scratch”
Impressions After Reading Chapter 4 of “LLM From Scratch”
Today is November 26, so if I finish one chapter a day, I’ll complete the challenge.I’m not sure if I can do it with my first and second kids constant...
Review of Chapter 3 of Learning LLM from Scratch
Review of Chapter 3 of Learning LLM from Scratch
After spilling a bucket of water on my MacBook, I was in shock and wasted about 3-4 days. In retrospect, since my MacBook was already damaged, I should have thought of it as being sent for repair and done something. Anyway, although it's a bit late, I am determined to see it through and leave a review of Chapter 3. 1. Attention Mechanism Chapter 3...

댓글을 불러오는 중...