Re: Tkinter module test: widget class not inserted in application frame

2022-06-17 Thread Rich Shepard

On Fri, 17 Jun 2022, Dennis Lee Bieber wrote:


ContactNameInput, 'lname',
ContactNameInput, 'fname',


This works if a tk.labelframe is where the widget is placed. In my case, as
MRAB taught me, the proper syntax is
self,'lname'...
self.'fname'...

Thanks, Dennis,

Rich
--
https://mail.python.org/mailman/listinfo/python-list


PEP 401 origin and authorship

2022-06-17 Thread Chris Angelico
Somewhere around the place, I remember reading something about how PEP
401 (the retirement of the BDFL and the accession of the FLUFL) came
to be. It involved a joke being turned on its originator, I think. But
I can't find it back. Anyone have a reference handy?

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tkinter module test: widget class not inserted in application frame

2022-06-17 Thread Dennis Lee Bieber
On Fri, 17 Jun 2022 09:19:59 -0700 (PDT), Rich Shepard
 declaimed the following:

>I'm not seeing the error source in a small tkinter module I'm testing.
>
>The module code:
>---
>import tkinter as tk
>from tkinter import ttk
>
>import common_classes as cc
>
>class ConactNameInput(tk.Frame):

Presuming this is a cut of the actual code...

> ContactNameInput, 'lname',

> ContactNameInput, 'fname',


> ContactNameInput(self).grid(row = 0, column = 0, sticky=('EWNS'))

... please compare the spelling!



-- 
Wulfraed Dennis Lee Bieber AF6VN
wlfr...@ix.netcom.comhttp://wlfraed.microdiversity.freeddns.org/
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pycharm issue

2022-06-17 Thread dn
On 18/06/2022 11.21, Giorgos Poriotis wrote:
> I use windows 10 , I click on a shortcut of the pycharm , the icon that
> runs the programm

Please reply to the list - there are many people here who know more than
I, and can help you with MS-Windows issues.

Please review https://docs.python.org/3/using/windows.html

If it is a matter of choosing which/how to open .py files, that is an
MS-Win question. There may be a decision to be made: does clicking on a
.py file mean that you wish to edit it (in PyCharm), or do you wish to
run the code in the Python interpreter.


> *From: *dn 
> *Sent: *Saturday, June 18, 2022 02:05
> *To: *python-list@python.org 
> *Subject: *Re: pycharm issue
> 
>  
> 
> On 18/06/2022 10.52, GIORGOS PORIOTIS wrote:
> 
>>  > Hello i have an issue with my pycharm latest edition, it doesnt
> take the
> 
>> files in the pycharm window , when i click on
> 
>>  > them , also intead of the pycharm picture on my py files i have the
> idle
> 
>> picture ...
> 
>  
> 
> This list is for Python (cf PyCharm)! However, many of us use PyCharm...
> 
>  
> 
> What are you typing or clicking-on to start Python/Idle/PyCharm?
> 
> Which operating system?


-- 
Regards,
=dn
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pycharm issue

2022-06-17 Thread dn
On 18/06/2022 10.52, GIORGOS PORIOTIS wrote:
>  > Hello i have an issue with my pycharm latest edition, it doesnt take the
> files in the pycharm window , when i click on
>  > them , also intead of the pycharm picture on my py files i have the idle
> picture ...

This list is for Python (cf PyCharm)! However, many of us use PyCharm...

What are you typing or clicking-on to start Python/Idle/PyCharm?
Which operating system?
-- 
Regards,
=dn
-- 
https://mail.python.org/mailman/listinfo/python-list


pycharm issue

2022-06-17 Thread GIORGOS PORIOTIS
 > Hello i have an issue with my pycharm latest edition, it doesnt take the
files in the pycharm window , when i click on
 > them , also intead of the pycharm picture on my py files i have the idle
picture ...
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tkinter module test: widget class not inserted in application frame

2022-06-17 Thread Rich Shepard

On Fri, 17 Jun 2022, MRAB wrote:


This:

self.inputs['Last name'] = cc.LabelInput(
ContactNameInput, 'lname',
input_class = ttk.Entry,
input_var = tk.StringVar()
)

should be this:

self.inputs['Last name'] = cc.LabelInput(
self, 'lname',
input_class = ttk.Entry,
input_var = tk.StringVar()
)

Also, this:

self.inputs['First name'] = cc.LabelInput(
ContactNameInput, 'fname',
input_class = ttk.Entry,
input_var = tk.StringVar()
)

should be this:

self.inputs['First name'] = cc.LabelInput(
self, 'fname',
input_class = ttk.Entry,
input_var = tk.StringVar()
)


MRAB,

Ah! I must have misread Alan Moore's examples, then. I'll need to fix all my
views.

Thank you,

Rich
--
https://mail.python.org/mailman/listinfo/python-list


Re: Tkinter module test: widget class not inserted in application frame

2022-06-17 Thread MRAB

On 2022-06-17 18:06, Rich Shepard wrote:

On Fri, 17 Jun 2022, MRAB wrote:

You haven't shown the code for common_classes.LabelInput, but I'm guessing 
that the first argument should be the parent.



[snip]
You're passing in the _class_ ConactNameInput, but I'm guessing that it 
should be an _instance_ of that class, in this case, 'self'.


Haven't I done this in the application class?
class NameApplication(tk.Tk):
  def __init__(self, *args, **kwargs):
  super().__init__(*args, **kwargs)
  self.title("Contact Name")
  self.geometry("800x600")
  self.resizable(width = False, height = False)
  ContactNameInput(self).grid(row = 0, column = 0, sticky=('EWNS'))
  self.columnconfigure(0, weight=1)

If not, where do I specify the instance of the ContactNameInput class?


This:

 self.inputs['Last name'] = cc.LabelInput(
 ContactNameInput, 'lname',
 input_class = ttk.Entry,
 input_var = tk.StringVar()
 )

should be this:

 self.inputs['Last name'] = cc.LabelInput(
 self, 'lname',
 input_class = ttk.Entry,
 input_var = tk.StringVar()
 )

Also, this:

 self.inputs['First name'] = cc.LabelInput(
 ContactNameInput, 'fname',
 input_class = ttk.Entry,
 input_var = tk.StringVar()
 )

should be this:

 self.inputs['First name'] = cc.LabelInput(
 self, 'fname',
 input_class = ttk.Entry,
 input_var = tk.StringVar()
 )
--
https://mail.python.org/mailman/listinfo/python-list


Re: Tkinter module test: widget class not inserted in application frame

2022-06-17 Thread Rich Shepard

On Fri, 17 Jun 2022, MRAB wrote:

You haven't shown the code for common_classes.LabelInput, but I'm guessing 
that the first argument should be the parent.


Here's the LabelInput class:
class LabelInput(tk.Frame):
""" A widget containing a label and input together. """

def __init__(self, parent, label='', input_class=ttk.Entry,
 input_var=None, input_args=None, label_args=None,
 **kwargs):
super().__init__(parent, **kwargs)
label_args = label_args or {}
input_args = input_args or {}
self.variable = input_var,

if input_class in (ttk.Checkbutton, ttk.Button, ttk.Radiobutton):
input_args["text"] = label
input_args["variable"] = input_var
else:
self.label = ttk.Label(self, text=label, **label_args)
self.label.grid(row=0, column=0, sticky=(tk.W + tk.E))
input_args["textvariable"] = input_var

self.input = input_class(self, **input_args)
self.input.grid(row=1, column=0, sticky=(tk.W + tk.E))
self.columnconfigure(0, weight=1)
self.error = getattr(self.input, 'error', tk.StringVar())
self.error_label = ttk.Label(self, textvariable=self.error)
self.error_label.grid(row=2, column=0, sticky=(tk.W + tk.E))

def grid(self, sticky=(tk.E + tk.W), **kwargs):
super().grid(sticky=sticky, **kwargs)

def get(self):
try:
if self.variable:
return self.variable.get()
elif type(self.input) == tk.Text:
return self.input.get('1.0', tk.END)
else:
return self.input.get()
except (TypeError, tk.TclError):
# happens when numeric fields are empty.
return ''

def set(self, value, *args, **kwargs):
if type(self.variable) == tk.BooleanVar:
self.variable.set(bool(value))
elif self.variable:
self.variable.set(value, *args, **kwargs)
elif type(self.input) in (ttk.Checkbutton, ttk.Radiobutton):
if value:
self.input.select()
else:
self.input.deselect()
elif type(self.input) == tk.Text:
self.input.delete('1.0', tk.END)
self.input.insert('1.0', value)
else:
self.input.delete(0, tk.END)
self.input.insert(0, value)

You're passing in the _class_ ConactNameInput, but I'm guessing that it 
should be an _instance_ of that class, in this case, 'self'.


Haven't I done this in the application class?
class NameApplication(tk.Tk):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.title("Contact Name")
self.geometry("800x600")
self.resizable(width = False, height = False)
ContactNameInput(self).grid(row = 0, column = 0, sticky=('EWNS'))
self.columnconfigure(0, weight=1)

If not, where do I specify the instance of the ContactNameInput class?

Thanks,

Rich


--
Richard Shepard, Ph.D.  The Environmental Issues Doctor
Applied Ecosystem Services, LLC
Troutdale, OR 97060 USA503-667-4517 www[dot]appl-ecosys[dot]com
--
https://mail.python.org/mailman/listinfo/python-list


Re: Tkinter module test: widget class not inserted in application frame

2022-06-17 Thread MRAB

On 2022-06-17 17:19, Rich Shepard wrote:

I'm not seeing the error source in a small tkinter module I'm testing.

The module code:
---
import tkinter as tk
from tkinter import ttk

import common_classes as cc

class ConactNameInput(tk.Frame):
  def __init__(self, parent, *args, **kwargs):
  super().__init__(parent, *args, **kwargs)
  # A dict to keep track of input widgets
  self.inputs = {}

  self.inputs['Last name'] = cc.LabelInput(
  ContactNameInput, 'lname',
  input_class = ttk.Entry,
  input_var = tk.StringVar()
  )
  self.inputs['Last name'].grid(row = 0, column = 0)
  #
  self.inputs['First name'] = cc.LabelInput(
  ContactNameInput, 'fname',
  input_class = ttk.Entry,
  input_var = tk.StringVar()
  )
  self.inputs['First name'].grid(row = 0, column = 1)

  okay_button = tk.Button(self, text="OK",
  command=self.ok)
  okay_button.pack(side=tk.LEFT, padx=(20, 0), pady=(0, 20))

  cancel_button = tk.Button(self, text="Cancel",
command=self.cancel)
  cancel_button.pack(side=tk.RIGHT, padx=(0, 20), pady=(0, 20))

  def okay_button(self):
  pass

  def cancel_button(self):
  Quitter()

  def get_last_name(self):
  pass

  def get_first_name(self):
  pass


class NameApplication(tk.Tk):
  def __init__(self, *args, **kwargs):
  super().__init__(*args, **kwargs)
  self.title("Contact Name")
  self.geometry("800x600")
  self.resizable(width = False, height = False)
  ContactNameInput(self).grid(row = 0, column = 0, sticky=('EWNS'))
  self.columnconfigure(0, weight=1)

if __name__ == '__main__':
  app = NameApplication()
  app.mainloop()
--

The python error traceback:
--
Traceback (most recent call last):
File "contact_history_name_input.py", line 60, in 
  app = NameApplication()
File "contact_history_name_input.py", line 55, in __init__
  ContactNameInput(self).grid(row = 0, column = 0, sticky=('EWNS'))
File "contact_history_name_input.py", line 17, in __init__
  input_var = tk.StringVar()
File "/home/rshepard/development/BusinessTracker/views/common_classes.py", 
line 46, in __init__
  super().__init__(parent, **kwargs)
File "/usr/lib64/python3.7/tkinter/__init__.py", line 2744, in __init__
  Widget.__init__(self, master, 'frame', cnf, {}, extra)
File "/usr/lib64/python3.7/tkinter/__init__.py", line 2292, in __init__
  BaseWidget._setup(self, master, cnf)
File "/usr/lib64/python3.7/tkinter/__init__.py", line 2262, in _setup
  self.tk = master.tk
AttributeError: type object 'ContactNameInput' has no attribute 'tk'
--

I'm not correctly placing the NameInput class in the NameApplication frame.
What have I missed?

You haven't shown the code for common_classes.LabelInput, but I'm 
guessing that the first argument should be the parent.


You're passing in the _class_ ConactNameInput, but I'm guessing that it 
should be an _instance_ of that class, in this case, 'self'.

--
https://mail.python.org/mailman/listinfo/python-list


Tkinter module test: widget class not inserted in application frame

2022-06-17 Thread Rich Shepard

I'm not seeing the error source in a small tkinter module I'm testing.

The module code:
---
import tkinter as tk
from tkinter import ttk

import common_classes as cc

class ConactNameInput(tk.Frame):
def __init__(self, parent, *args, **kwargs):
super().__init__(parent, *args, **kwargs)
# A dict to keep track of input widgets
self.inputs = {}

self.inputs['Last name'] = cc.LabelInput(
ContactNameInput, 'lname',
input_class = ttk.Entry,
input_var = tk.StringVar()
)
self.inputs['Last name'].grid(row = 0, column = 0)
#
self.inputs['First name'] = cc.LabelInput(
ContactNameInput, 'fname',
input_class = ttk.Entry,
input_var = tk.StringVar()
)
self.inputs['First name'].grid(row = 0, column = 1)

okay_button = tk.Button(self, text="OK",
command=self.ok)
okay_button.pack(side=tk.LEFT, padx=(20, 0), pady=(0, 20))

cancel_button = tk.Button(self, text="Cancel",
  command=self.cancel)
cancel_button.pack(side=tk.RIGHT, padx=(0, 20), pady=(0, 20))

def okay_button(self):
pass

def cancel_button(self):
Quitter()

def get_last_name(self):
pass

def get_first_name(self):
pass


class NameApplication(tk.Tk):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.title("Contact Name")
self.geometry("800x600")
self.resizable(width = False, height = False)
ContactNameInput(self).grid(row = 0, column = 0, sticky=('EWNS'))
self.columnconfigure(0, weight=1)

if __name__ == '__main__':
app = NameApplication()
app.mainloop()
--

The python error traceback:
--
Traceback (most recent call last):
  File "contact_history_name_input.py", line 60, in 
app = NameApplication()
  File "contact_history_name_input.py", line 55, in __init__
ContactNameInput(self).grid(row = 0, column = 0, sticky=('EWNS'))
  File "contact_history_name_input.py", line 17, in __init__
input_var = tk.StringVar()
  File "/home/rshepard/development/BusinessTracker/views/common_classes.py", 
line 46, in __init__
super().__init__(parent, **kwargs)
  File "/usr/lib64/python3.7/tkinter/__init__.py", line 2744, in __init__
Widget.__init__(self, master, 'frame', cnf, {}, extra)
  File "/usr/lib64/python3.7/tkinter/__init__.py", line 2292, in __init__
BaseWidget._setup(self, master, cnf)
  File "/usr/lib64/python3.7/tkinter/__init__.py", line 2262, in _setup
self.tk = master.tk
AttributeError: type object 'ContactNameInput' has no attribute 'tk'
--

I'm not correctly placing the NameInput class in the NameApplication frame.
What have I missed?

Rich
--
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError

2022-06-17 Thread Joel Goldstick
On Fri, Jun 17, 2022 at 8:31 AM inhahe  wrote:
>
> sorry, I may have misused the term "namespace." I'm not sure what the
> proper word is for the names currently loaded into the global scope.
>
> On Fri, Jun 17, 2022 at 8:26 AM inhahe  wrote:
>
> > sys is a built-in module, but it's not in the namespace unless you import
> > it first.
> > before your print statement, enter "import sys"
> >
> > On Fri, Jun 17, 2022 at 8:23 AM  wrote:
> >
> >> Thank you for your email.
> >>
> >> C:\Users\zszen>python.exe
> >> Python 3.10.5 (tags/v3.10.5:f377153, Jun  6 2022, 16:14:13) [MSC v.1929
> >> 64 bit (AMD64)] on win32
> >> Type "help", "copyright", "credits" or "license" for more information.
> >> >>> print(sys.version)
> >> Traceback (most recent call last):
> >>   File "", line 1, in 
> >> NameError: name 'sys' is not defined
> >>
> >> >>> print(sys.executable)
> >> Traceback (most recent call last):
> >>   File "", line 1, in 
> >> NameError: name 'sys' is not defined
> >>
> >> On Fri, Jun 17, 2022, at 12:35 PM, Eryk Sun wrote:
> >> > On 6/17/22, Zoltan Szenderak  wrote:
> >> > >
> >> > > print(sys.version_info) and executable:
> >> > > Unable to initialize device PRN
> >> >
> >> > That's the command-line "print" program. You need to first start the
> >> > Python shell via python.exe. The prompt should change to ">>> ". Then
> >> > run print(sys.version) and print(sys.executable).
> >> >
> >> --
> >> https://mail.python.org/mailman/listinfo/python-list
> >>
> >
> --
> https://mail.python.org/mailman/listinfo/python-list

sys is a module that is part of 'batteries included' in python.  Since
it is not part of the language per se, you need to import it


-- 
Joel Goldstick
-- 
https://mail.python.org/mailman/listinfo/python-list


[Python-announce] ANN: django-compat-patcher 0.11 released

2022-06-17 Thread Pascal Chambon

Hello,

it's with great pleasure that I announce the release of 
*django-compat-patcher v0.11*


This release extends compatibility fixers so that you can painlessly 
upgrade your project to *Django 4.0*, without breaking your existing 
pluggable-apps ecosystem.


--

DCP is a companion package which adds backwards/forwards compatibility 
patches to Django, so that your dependencies don't get broken by trivial 
changes made to the core of the framework.


It injects compatibility shims like function/attribute aliases, restores 
data structures which were replaced by stdlib ones, extends the 
behaviour of callables (eg. referring to a view by object, by name, or 
by dotted path), and can even preserve deprecated modules as “import 
aliases”.


This allows to you upgrade your dependencies one at a time, to 
fork/patch them when you have a proper opportunity, and most importantly 
to not get stuck, when deadlines are tight.


Technically, DCP manages a set of “fixers”, small utilities which 
advertise the change that they make, the versions of Django that they 
support, and which monkey-patch the Django framework on demand.


Beware, DCP is aimed at project maintainers. If you are developing a 
reusable Django application, you can’t expect all your users to 
integrate DCP as well. In this case, to support a wide range of Django 
versions, you should rather use a toolkit like Django-compat 
. You may think of DCP as a 
“runtime 2to3 for Django’, wherease Django-Compat is rather a “six 
module for Django”.


Feel free to contribute new fixers, for backwards or forwards 
compatibility, depending on the compatibility troubles you encounter on 
your projects


https://pypi.org/project/django-compat-patcher/
https://github.com/pakal/django-compat-patcher

regards,
Pakal
___
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com


Re: ModuleNotFoundError

2022-06-17 Thread inhahe
sorry, I may have misused the term "namespace." I'm not sure what the
proper word is for the names currently loaded into the global scope.

On Fri, Jun 17, 2022 at 8:26 AM inhahe  wrote:

> sys is a built-in module, but it's not in the namespace unless you import
> it first.
> before your print statement, enter "import sys"
>
> On Fri, Jun 17, 2022 at 8:23 AM  wrote:
>
>> Thank you for your email.
>>
>> C:\Users\zszen>python.exe
>> Python 3.10.5 (tags/v3.10.5:f377153, Jun  6 2022, 16:14:13) [MSC v.1929
>> 64 bit (AMD64)] on win32
>> Type "help", "copyright", "credits" or "license" for more information.
>> >>> print(sys.version)
>> Traceback (most recent call last):
>>   File "", line 1, in 
>> NameError: name 'sys' is not defined
>>
>> >>> print(sys.executable)
>> Traceback (most recent call last):
>>   File "", line 1, in 
>> NameError: name 'sys' is not defined
>>
>> On Fri, Jun 17, 2022, at 12:35 PM, Eryk Sun wrote:
>> > On 6/17/22, Zoltan Szenderak  wrote:
>> > >
>> > > print(sys.version_info) and executable:
>> > > Unable to initialize device PRN
>> >
>> > That's the command-line "print" program. You need to first start the
>> > Python shell via python.exe. The prompt should change to ">>> ". Then
>> > run print(sys.version) and print(sys.executable).
>> >
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>>
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError

2022-06-17 Thread inhahe
sys is a built-in module, but it's not in the namespace unless you import
it first.
before your print statement, enter "import sys"

On Fri, Jun 17, 2022 at 8:23 AM  wrote:

> Thank you for your email.
>
> C:\Users\zszen>python.exe
> Python 3.10.5 (tags/v3.10.5:f377153, Jun  6 2022, 16:14:13) [MSC v.1929 64
> bit (AMD64)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> print(sys.version)
> Traceback (most recent call last):
>   File "", line 1, in 
> NameError: name 'sys' is not defined
>
> >>> print(sys.executable)
> Traceback (most recent call last):
>   File "", line 1, in 
> NameError: name 'sys' is not defined
>
> On Fri, Jun 17, 2022, at 12:35 PM, Eryk Sun wrote:
> > On 6/17/22, Zoltan Szenderak  wrote:
> > >
> > > print(sys.version_info) and executable:
> > > Unable to initialize device PRN
> >
> > That's the command-line "print" program. You need to first start the
> > Python shell via python.exe. The prompt should change to ">>> ". Then
> > run print(sys.version) and print(sys.executable).
> >
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError

2022-06-17 Thread z . szenderak
Thank you for your email.

C:\Users\zszen>python.exe 
Python 3.10.5 (tags/v3.10.5:f377153, Jun  6 2022, 16:14:13) [MSC v.1929 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print(sys.version)
Traceback (most recent call last):
  File "", line 1, in 
NameError: name 'sys' is not defined

>>> print(sys.executable) 
Traceback (most recent call last):
  File "", line 1, in 
NameError: name 'sys' is not defined

On Fri, Jun 17, 2022, at 12:35 PM, Eryk Sun wrote:
> On 6/17/22, Zoltan Szenderak  wrote:
> >
> > print(sys.version_info) and executable:
> > Unable to initialize device PRN
> 
> That's the command-line "print" program. You need to first start the
> Python shell via python.exe. The prompt should change to ">>> ". Then
> run print(sys.version) and print(sys.executable).
> 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError

2022-06-17 Thread Eryk Sun
On 6/17/22, Zoltan Szenderak  wrote:
>
> print(sys.version_info) and executable:
> Unable to initialize device PRN

That's the command-line "print" program. You need to first start the
Python shell via python.exe. The prompt should change to ">>> ". Then
run print(sys.version) and print(sys.executable).
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError

2022-06-17 Thread 2QdxY4RzWzUUiLuE
On 2022-06-17 at 08:03:28 +,
Zoltan Szenderak  wrote:

> How do I reply to: Chris Angelico rosuav at gmail.com so it is listed
> on the Python list?

Please don't.  Please continue replying to python-list@python.org; that
way, other people can help you, and future programmers can find their
issues in the public archives.  ChrisA is a regular on this list, and
will see your replies on it.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError

2022-06-17 Thread Zoltan Szenderak
Re: https://mail.python.org/pipermail/python-list/2022-June/906698.html


How do I reply to: Chris Angelico rosuav at gmail.com so it is listed on the 
Python list?
Chris Angelico rosuav at 
gmail.com
Wed Jun 15 15:14:49 EDT 2022


What does "pip3 --version" tell you, and what happens if you print out

sys.version at the top of your script? Also possibly sys.executable,

in case your script isn't running from inside the venv that it looks

like it ought to be working in.

My reply:
Pip version
pip 22.1.2 from C:\Users\zszen\ENV\lib\site-packages\pip (python 3.10)

print(sys.version_info) and executable:
Unable to initialize device PRN


Kind regards,

Zoltan

-- 
https://mail.python.org/mailman/listinfo/python-list