LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-20-2020, 08:10 PM   #1
ruy
Member
 
Registered: Feb 2018
Posts: 43

Rep: Reputation: Disabled
Can't import Python package installed with pacman


Hello, I was reading and I decide install my python packages with pacman (I use 3 or 4 packages usually). But when I install it and try to use it with import, I have the issue:
ModuleNotFoundError: No module named pandas

The same error with numpy, matplotlib, statsmodels and beautifulsoup4 (these are the only packages I use).

I'm using spyder as editor (also installed with pacman).
I don't care the virtual environmet (I'm the only user of the PC) and don't create one. Only work with the scripts.

Thank you

Ruy
 
Old 07-21-2020, 07:10 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Show us the code, and full error messages.
 
Old 07-21-2020, 03:46 PM   #3
ruy
Member
 
Registered: Feb 2018
Posts: 43

Original Poster
Rep: Reputation: Disabled
Hello ondoho, the full message is:

Traceback (most recent call last):
File "grafico.py", line 6, in <module>
import matplotlib.pytplot as plt
ModuleNotFoundError: No module named 'matplotlib.pytplot'


In this script I also load pandas and numpy.
In this case I'm using Vim and running the script in terminal, but the issue is the same with Spyder.

Thank you.

Ruy
 
Old 07-21-2020, 04:51 PM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Look at a python program in your /usr/bin and see how it's done there.
 
Old 07-21-2020, 06:19 PM   #5
ruy
Member
 
Registered: Feb 2018
Posts: 43

Original Poster
Rep: Reputation: Disabled
Hello ondoho, thanks for your fast answer.
The only one difference in the python docs is that start the scrpit with the line:

#!/usr/bin/python3.8

Or some variation of this (/usr/bin/python2, .../env python, .../python).

Thank you.

Ruy
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] No package 'x11' found No package 'xext' found No package 'xdamage' found No package 'xfixes' found No package 'x11-xcb' found Jigsaw Linux From Scratch 14 02-23-2021 08:35 PM
LXer: Deb-pacman : A Pacman-style Frontend For APT Package Manager LXer Syndicated Linux News 1 12-09-2019 05:21 PM
Why do we need pacman-key if pacman checks md5? Mr. Alex Arch 5 03-09-2012 05:05 PM
Anyone else 'pacman -Sy' instead of simply 'pacman -S'-ing packages? Kenny_Strawn Arch 15 03-23-2011 01:09 PM
LXer: Python Python Python (aka Python 3) LXer Syndicated Linux News 0 08-05-2009 08:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration