LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-24-2021, 05:37 PM   #1
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,834

Rep: Reputation: 108Reputation: 108
python3, pycharm ModuleNotFoundError: No module named 'wx'


Hya,

Problem As title reads, ModuleNotFoundError: No module named 'wx'

System Debian amd64 testing. (pycharm is not debian package, downloaded from Jetbrains.com community version)

Situation Script chokes at "import wx" under pycharm, but not python interactive mode.

Troubleshooting I was somewhat confident that something is wrong with pycharm, so played around PYTHONPATH and venv setting without success. It turned out to be that wx is NOT under sys.path. It is under /usr/lib/python3, while sys.path has only /usr/lib/python3.9

Workaround Add
Code:
sys.path.append(r'/usr/lib/python3/dist-packages')
works.

But, there must be some reason for these two distinct directories to exist (python3.9 and python3). So some adverse effect may happen in future. Hopefully not.

cheers

Closing remark May our penguins be happy!

Last edited by kaz2100; 05-24-2021 at 05:38 PM. Reason: typo
 
Old 05-25-2021, 05:46 AM   #2
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,627

Rep: Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556

Your post is confusing. Are you saying PyCharm IDE itself is not working, or are you trying to run your own existing script/application through PyCharm?

Either way, the first place you check should be the JetBrains support knowledgebase - have you done that yet?

 
Old 05-25-2021, 06:19 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,033

Rep: Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344Reputation: 7344
duplicate of https://www.linuxquestions.org/quest...1/#post6253679
 
Old 05-25-2021, 06:02 PM   #4
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,834

Original Poster
Rep: Reputation: 108Reputation: 108
Hya,

Thanks for replies.

boughtonp: I am running an existing script on pycharm to modify (2 to 3 upgrade). Yes, I checked the knowledgegbase without success. I should have spent more time, I apologize.

pan64: Yes, that kind of issue might happen in future. I have not mixed python2 and python3 libraries. I added wx related ones, which exist under python3. For some reason, pycharm has only python3.9 as sys.path. With current Debian testing, standard libraries are under python3.9, while wx ones are under python3. There must be a reason, which I cannot guess now, and I do not want to violate.

If anything happens, I will update.

cheers
 
  


Reply

Tags
debian, pycharm, python3, sys.path, wxpython



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] ModuleNotFoundError: No module named 'html.entities'; 'html' is not a package (python3 error) kaz2100 Linux - Software 3 05-25-2021 12:48 AM
[SOLVED] apt install broken - ConfigParser import SafeConfigParser ModuleNotFoundError: No module named 'ConfigParser' anon052 Linux - Newbie 16 08-06-2020 06:11 AM
Anyone use PyCharm? pip and pycharm communication issues vysero Programming 1 06-12-2018 05:25 AM
After upgrade python3.4 to python3.5.1 , not able to install packages "request" though pip3 YOGESHAS87 Linux - Software 1 08-03-2016 10:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:07 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