Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pyside6 module not found
#1
Hello,

I was writing a couple of programs under manjaro KDE. Now I've switched to ubuntu 23.04 and, when trying to run them, receive the following error:

ModuleNotFoundError: No module named 'PySide6'

Both programs have active venv. I also have a third program which used to work under manjaro but having the same problem now. Tried to create a virtual environment for it, but pip refuses to install pyside6 to it, claiming:

This environment is externally managed

Tried using pipx, which didn't help.

Any advise?

TIA
likes this post
Reply
#2
Sounds like you might have read this already:

https://itsfoss.com/externally-managed-environment/
ForeverNoob likes this post
Reply
#3
Yes, but now I read it again. And again. Now it works, but just when running the program from command line. When opening it for editing/debugging in visual studio code it still doesn't work, saying "ModuleNotFoundError: No module named 'PySide6'". What am I missing?

TY
Reply
#4
You need to configure VSCode to use your virtual environment.

https://code.visualstudio.com/docs/python/environments
Reply
#5
Can also look at this post.
Quic demo of something i have posted before.
# Make environment
tom@tom:~$ python -m venv sci_env
tom@tom:~$ cd sci_env/
tom@tom:~/sci_env$ source bin/activate 

(sci_env) tom@tom:~/sci_env$ pip -V
pip 21.2.4 from /home/tom/sci_env/lib/python3.10/site-packages/pip (python 3.10)
(sci_env) tom@tom:~/sci_env$ pip install pyside6
Collecting pyside6
 .....
So now in VSCode i most choice 3.10(sci_env: venv).
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Module Not Found Error bitoded 4 1,420 Jan-01-2023, 09:08 AM
Last Post: bitoded
  Qcolor name pyside6 PatM 2 1,139 Dec-13-2022, 07:29 AM
Last Post: PatM
  pdfminer package: module isn't found Pavel_47 25 9,043 Sep-18-2022, 08:40 PM
Last Post: Larz60+
  Module not found question sighhhh12 0 1,508 Sep-09-2022, 05:43 AM
Last Post: sighhhh12
  [SOLVED] Tkinter module not found Milan 7 24,527 Aug-05-2022, 09:45 PM
Last Post: woooee
  No module found when I run a main.py tomtom 2 1,484 Jul-20-2022, 09:24 AM
Last Post: tomtom
  No Module found in other directory than source code [SOLVED] AlphaInc 1 2,073 Nov-10-2021, 04:34 PM
Last Post: AlphaInc
  KafkaUtils module not found on spark 3 pyspark aupres 2 7,402 Feb-17-2021, 09:40 AM
Last Post: Larz60+
  'urllib3' Module not found when import 'requests' spanz 5 10,314 Jan-06-2021, 05:57 PM
Last Post: snippsat
  no module named finbert found ErnestTBass 4 4,616 Dec-05-2020, 06:09 PM
Last Post: andrianas

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020