What can I do about this?

2022-08-28 Thread gene heskett

Greatings all;

Persuant to my claim the py3.10 is busted, here is a sample. This is me, 
trying to make
pronterface, inside a venv: When the package manager version will only 
run the gui-less "pronsole"

but nothing else from that all python kit runs as it should or at all.
From the package-managers install in /usr/share/doc/printrun-common/ I 
copied requirements.txt

into the venv, and ran this command line:

gene@rock64:~/venv$ pip3 install -r requirements.txt
Defaulting to user installation because normal site-packages is not 
writeable
Ignoring pyobjc-framework-Cocoa: markers 'sys_platform == "darwin"' 
don't match your environment
Ignoring pyreadline: markers 'sys_platform == "win32"' don't match your 
environment
Requirement already satisfied: pyserial>=3.0 in 
/usr/lib/python3/dist-packages (from -r requirements.txt (line 1)) (3.5)

Collecting wxPython>=4.1
  Using cached wxPython-4.2.0.tar.gz (71.0 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
  Traceback (most recent call last):
    File "", line 2, in 
    File "", line 34, in 
    File 
"/tmp/pip-install-c9gmbpsr/wxpython_1a0e096c87d84229b709c31ccb920a24/setup.py", 
line 27, in 
  from buildtools.config import Config, msg, opj, runcmd, 
canGetSOName, getSOName
    File 
"/tmp/pip-install-c9gmbpsr/wxpython_1a0e096c87d84229b709c31ccb920a24/buildtools/config.py", 
line 30, in 

  from attrdict import AttrDict
  ModuleNotFoundError: No module named 'attrdict'
  [end of output]

  note: This error originates from a subprocess, and is likely not a 
problem with pip.

error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

What do I need to do to fix this? It supposedly works on a rpi4b, but 
this is a rock64, V2,

older stuff with 4 gigs of dram.

Thank you for any help you can toss my way.

Cheers, Gene Heskett.

--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 

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


Re: What can I do about this?

2022-08-28 Thread Chris Angelico
On Mon, 29 Aug 2022 at 08:41, gene heskett  wrote:
>
> Greatings all;
>
> Persuant to my claim the py3.10 is busted, here is a sample. This is me,
> trying to make
> pronterface, inside a venv: When the package manager version will only
> run the gui-less "pronsole"
> but nothing else from that all python kit runs as it should or at all.
>  From the package-managers install in /usr/share/doc/printrun-common/ I
> copied requirements.txt
> into the venv, and ran this command line:
>
> gene@rock64:~/venv$ pip3 install -r requirements.txt
> Defaulting to user installation because normal site-packages is not
> writeable

I don't think Python 3.10 is busted; it's more likely your venv is not
providing a pip3 command. Try "pip3 --version", "python3 --version",
and then "python3 -m pip install -r requirements.txt".

Why do you keep blaming Python as if it's fundamentally broken?

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


Re: What can I do about this?

2022-08-28 Thread Peter J. Holzer
On 2022-08-28 18:40:17 -0400, gene heskett wrote:
> Persuant to my claim the py3.10 is busted, here is a sample. This is me,
> trying to make
> pronterface, inside a venv: When the package manager version will only run
> the gui-less "pronsole"
> but nothing else from that all python kit runs as it should or at all.
> From the package-managers install in /usr/share/doc/printrun-common/ I
> copied requirements.txt
> into the venv, and ran this command line:
> 
> gene@rock64:~/venv$ pip3 install -r requirements.txt

You are almost certainly *not* in a venv here. First, your prompt
doesn't show the name of the venv,

> Defaulting to user installation because normal site-packages is not
> writeable

and second, because of this message, which you don't get if you invoke
pip inside a venv (at least not if you can write it).

So, first thing to do is to create the venv and activate it.

hp

-- 
   _  | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| |   | h...@hjp.at |-- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |   challenge!"


signature.asc
Description: PGP signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What can I do about this?

2022-08-28 Thread gene heskett

On 8/28/22 19:36, Chris Angelico wrote:

On Mon, 29 Aug 2022 at 08:41, gene heskett  wrote:

Greatings all;

Persuant to my claim the py3.10 is busted, here is a sample. This is me,
trying to make
pronterface, inside a venv: When the package manager version will only
run the gui-less "pronsole"
but nothing else from that all python kit runs as it should or at all.
  From the package-managers install in /usr/share/doc/printrun-common/ I
copied requirements.txt
into the venv, and ran this command line:

gene@rock64:~/venv$ pip3 install -r requirements.txt
Defaulting to user installation because normal site-packages is not
writeable

I don't think Python 3.10 is busted; it's more likely your venv is not
providing a pip3 command. Try "pip3 --version",

gene@rock64:~/venv$ pip3 --version
pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)

  "python3 --version",

gene@rock64:~/venv$ python3 --version
Python 3.10.4


and then "python3 -m pip install -r requirements.txt".

gene@rock64:~/venv$ python3 -m pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not 
writeable
Ignoring pyobjc-framework-Cocoa: markers 'sys_platform == "darwin"' 
don't match your environment
Ignoring pyreadline: markers 'sys_platform == "win32"' don't match your 
environment
Requirement already satisfied: pyserial>=3.0 in 
/usr/lib/python3/dist-packages (from -r requirements.txt (line 1)) (3.5)

Collecting wxPython>=4.1
  Using cached wxPython-4.2.0.tar.gz (71.0 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
  Traceback (most recent call last):
    File "", line 2, in 
    File "", line 34, in 
    File 
"/tmp/pip-install-g3phtj8f/wxpython_17898b1c7a6f49a690adac623d839514/setup.py", 
line 27, in 
  from buildtools.config import Config, msg, opj, runcmd, 
canGetSOName, getSOName
    File 
"/tmp/pip-install-g3phtj8f/wxpython_17898b1c7a6f49a690adac623d839514/buildtools/config.py", 
line 30, in 

  from attrdict import AttrDict
  ModuleNotFoundError: No module named 'attrdict'
  [end of output]

  note: This error originates from a subprocess, and is likely not a 
problem with pip.

error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.



Why do you keep blaming Python as if it's fundamentally broken?

ChrisA
Given the above output, do you have a better target? It also fails to 
build linuxcnc on

bullseye for armhf, on an rpi4b with 2 gigs of dram.
Works perfectly on buster, but I expect that has been fixed  since linuxcnc
looks like its good to go for inclusion in bookworm.

Take care and stay well Chris.

Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 

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


Re: What can I do about this?

2022-08-28 Thread gene heskett

On 8/28/22 19:39, Peter J. Holzer wrote:

On 2022-08-28 18:40:17 -0400, gene heskett wrote:

Persuant to my claim the py3.10 is busted, here is a sample. This is me,
trying to make
pronterface, inside a venv: When the package manager version will only run
the gui-less "pronsole"
but nothing else from that all python kit runs as it should or at all.
 From the package-managers install in /usr/share/doc/printrun-common/ I
copied requirements.txt
into the venv, and ran this command line:

gene@rock64:~/venv$ pip3 install -r requirements.txt

You are almost certainly *not* in a venv here. First, your prompt
doesn't show the name of the venv,

I've created that several times, as octoprint won''t run without it either.
I found a way to autostart it on reboots and octoprint seems happy with it

Defaulting to user installation because normal site-packages is not
writeable

and second, because of this message, which you don't get if you invoke
pip inside a venv (at least not if you can write it).

So, first thing to do is to create the venv and activate it.

Procedure? Or a url to it?

Thank you Peter. Take care & stay well.

 hp





Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 

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


Re: How to make a variable's late binding crosses the module boundary?

2022-08-28 Thread Mark Bourne

Jach Feng wrote:

I have two files: test.py and test2.py
--test.py--
x = 2
def foo():
 print(x)
foo()

x = 3
foo()

--test2.py--
from test import *
x = 4
foo()

-
Run test.py under Winows8.1, I get the expected result:
e:\MyDocument>py test.py
2
3

But when run test2.py, the result is not my expected 2,3,4:-(
e:\MyDocument>py test2.py
2
3
3

What to do?


`from test import *` does not link the names in `test2` to those in 
`test`.  It just binds objects bound to names in `test` to the same 
names in `test2`.  A bit like doing:


import test
x = test.x
foo = test.foo
del test

Subsequently assigning a different object to `x` in one module does not 
affect the object assigned to `x` in the other module.  So `x = 4` in 
`test2.py` does not affect the object assigned to `x` in `test.py` - 
that's still `3`.  If you want to do that, you need to import `test` and 
assign to `test.x`, for example:


import test
test.x = 4
test.foo()

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


Re: How to make a variable's late binding crosses the module boundary?

2022-08-28 Thread Jach Feng
Mark Bourne 在 2022年8月27日 星期六晚上7:42:37 [UTC+8] 的信中寫道:
> import test 
> test.x = 4 
> test.foo() 
> 
> -- 
> Mark.
Yes, you are right. But because of I am using "from test import *" which makes 
the name "test" disappear in the test2 scope, so this is not work.

I solved this problem by moving "x" to a separate config.py file, import it in 
both test.py and test2.py, and access it using config.x

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


Re: python 3.10 vs breakage

2022-08-28 Thread Dennis Lee Bieber
On Fri, 26 Aug 2022 17:36:39 -0400, gene heskett 
declaimed the following:

>
>Bullseye is the current debian-11, buster is last years, bookworm is next.
>
>Linuxcnc builds just fine on armhf buster, with its python-3.9.4. fails 
>from 3.10 in bullseye. Pronterface.py can't find wxPython 4.0 or 
>greater, with 4.0.7 installed. Octoprint did work, but has now stopped. 
>So my 3d printing has become a sneakernet exercise again. Adding 3 to 5 
>more steps between OpenCSAD and the printer that will make my designs. 

All of this suggests to me that you need to make your complaints to the
Debian devs WRT how they have configured things (or, if using an R-Pi, the
R-Pi Foundation, as they customize Debian for their release).
.


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


Re: What can I do about this?

2022-08-28 Thread Dennis Lee Bieber
On Sun, 28 Aug 2022 18:40:17 -0400, gene heskett 
declaimed the following:


>Collecting wxPython>=4.1
>   Using cached wxPython-4.2.0.tar.gz (71.0 MB)
>   Preparing metadata (setup.py) ... error
>   error: subprocess-exited-with-error
>

>     File 
>"/tmp/pip-install-c9gmbpsr/wxpython_1a0e096c87d84229b709c31ccb920a24/buildtools/config.py",
> 
>line 30, in 
>   from attrdict import AttrDict
>   ModuleNotFoundError: No module named 'attrdict'
>   [end of output]
>

Well... First I'd ask where you obtained a 4.2.0 tar.gz version of
wxPython? Maybe try overriding it with a 4.1 variant of it -- or whatever
you can find in the OS's package manager.
>
>What do I need to do to fix this? It supposedly works on a rpi4b, but 
>this is a rock64, V2,
>older stuff with 4 gigs of dram.
>
>Thank you for any help you can toss my way.
>

Ask in a forum specific to the OS? Heck, what IS the OS on that board,
and how up-to-date is it? The R-Pi is running a Raspberry Foundation
modified Debian Buster or Bullseye (appears they've pulled Buster, oldest
OS in the archive is January's Bullseye release).

This does not appear to really be a Python related problem -- rather it
looks like OS misconfiguration/disagreement.

However, you may wish to review
https://github.com/wxWidgets/Phoenix/issues/2225 

Python3.10 is, perhaps, too NEW and various third-party libraries have
not been updated to be compatible with IT. Maybe install a version of
Python3.9 and start over loading all those extra packages.


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


Re: How to make a variable's late binding crosses the module boundary?

2022-08-28 Thread Richard Damon

On 8/27/22 7:42 AM, Mark Bourne wrote:

Jach Feng wrote:

I have two files: test.py and test2.py
--test.py--
x = 2
def foo():
 print(x)
foo()

x = 3
foo()

--test2.py--
from test import *
x = 4
foo()

-
Run test.py under Winows8.1, I get the expected result:
e:\MyDocument>py test.py
2
3

But when run test2.py, the result is not my expected 2,3,4:-(
e:\MyDocument>py test2.py
2
3
3

What to do?


`from test import *` does not link the names in `test2` to those in 
`test`.  It just binds objects bound to names in `test` to the same 
names in `test2`.  A bit like doing:


import test
x = test.x
foo = test.foo
del test

Subsequently assigning a different object to `x` in one module does 
not affect the object assigned to `x` in the other module. So `x = 4` 
in `test2.py` does not affect the object assigned to `x` in `test.py` 
- that's still `3`.  If you want to do that, you need to import `test` 
and assign to `test.x`, for example:


import test
test.x = 4
test.foo()


Yes, fundamental issue is that the statement

from x import y

makes a binding in this module to the object CURRECTLY bound to x.y to 
the name y, but if x.y gets rebound, this module does not track the changes.


You can mutate the object x.y and see the changes, but not rebind it.

If you need to see rebindings, you can't use the "from x import y" form, 
or at a minimum do it as:



import x

from x import y

then later to get rebindings to x.y do a

y = x.y

to rebind to the current x.y object.

--
Richard Damon

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


Re: How to make a variable's late binding crosses the module boundary?

2022-08-28 Thread Jach Feng
Richard Damon 在 2022年8月29日 星期一上午10:47:08 [UTC+8] 的信中寫道:
> On 8/27/22 7:42 AM, Mark Bourne wrote: 
> > Jach Feng wrote: 
> >> I have two files: test.py and test2.py 
> >> --test.py-- 
> >> x = 2 
> >> def foo(): 
> >>  print(x) 
> >> foo() 
> >> 
> >> x = 3 
> >> foo() 
> >> 
> >> --test2.py-- 
> >> from test import * 
> >> x = 4 
> >> foo() 
> >> 
> >> - 
> >> Run test.py under Winows8.1, I get the expected result: 
> >> e:\MyDocument>py test.py 
> >> 2 
> >> 3 
> >> 
> >> But when run test2.py, the result is not my expected 2,3,4:-( 
> >> e:\MyDocument>py test2.py 
> >> 2 
> >> 3 
> >> 3 
> >> 
> >> What to do? 
> > 
> > `from test import *` does not link the names in `test2` to those in 
> > `test`.  It just binds objects bound to names in `test` to the same 
> > names in `test2`.  A bit like doing: 
> > 
> > import test 
> > x = test.x 
> > foo = test.foo 
> > del test 
> > 
> > Subsequently assigning a different object to `x` in one module does 
> > not affect the object assigned to `x` in the other module. So `x = 4` 
> > in `test2.py` does not affect the object assigned to `x` in `test.py` 
> > - that's still `3`.  If you want to do that, you need to import `test` 
> > and assign to `test.x`, for example: 
> > 
> > import test 
> > test.x = 4 
> > test.foo() 
> >
> Yes, fundamental issue is that the statement 
> 
> from x import y 
> 
> makes a binding in this module to the object CURRECTLY bound to x.y to 
> the name y, but if x.y gets rebound, this module does not track the changes. 
> 
> You can mutate the object x.y and see the changes, but not rebind it. 
> 
> If you need to see rebindings, you can't use the "from x import y" form, 
> or at a minimum do it as: 
> 
> 
> import x 
> 
> from x import y 
> 
> then later to get rebindings to x.y do a 
> 
> y = x.y 
> 
> to rebind to the current x.y object. 
> 
> -- 
> Richard Damon
Yes, an extra "import x" will solve my problem too! Sometimes I am wondering 
why "from x import y" hides x? hum...can't figure out the reason:-)

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


Re: How to make a variable's late binding crosses the module boundary?

2022-08-28 Thread Chris Angelico
On Mon, 29 Aug 2022 at 15:54, Jach Feng  wrote:
>
> Richard Damon 在 2022年8月29日 星期一上午10:47:08 [UTC+8] 的信中寫道:
> > On 8/27/22 7:42 AM, Mark Bourne wrote:
> > > Jach Feng wrote:
> > >> I have two files: test.py and test2.py
> > >> --test.py--
> > >> x = 2
> > >> def foo():
> > >>  print(x)
> > >> foo()
> > >>
> > >> x = 3
> > >> foo()
> > >>
> > >> --test2.py--
> > >> from test import *
> > >> x = 4
> > >> foo()
> > >>
> > >> -
> > >> Run test.py under Winows8.1, I get the expected result:
> > >> e:\MyDocument>py test.py
> > >> 2
> > >> 3
> > >>
> > >> But when run test2.py, the result is not my expected 2,3,4:-(
> > >> e:\MyDocument>py test2.py
> > >> 2
> > >> 3
> > >> 3
> > >>
> > >> What to do?
> > >
> > > `from test import *` does not link the names in `test2` to those in
> > > `test`.  It just binds objects bound to names in `test` to the same
> > > names in `test2`.  A bit like doing:
> > >
> > > import test
> > > x = test.x
> > > foo = test.foo
> > > del test
> > >
> > > Subsequently assigning a different object to `x` in one module does
> > > not affect the object assigned to `x` in the other module. So `x = 4`
> > > in `test2.py` does not affect the object assigned to `x` in `test.py`
> > > - that's still `3`.  If you want to do that, you need to import `test`
> > > and assign to `test.x`, for example:
> > >
> > > import test
> > > test.x = 4
> > > test.foo()
> > >
> > Yes, fundamental issue is that the statement
> >
> > from x import y
> >
> > makes a binding in this module to the object CURRECTLY bound to x.y to
> > the name y, but if x.y gets rebound, this module does not track the changes.
> >
> > You can mutate the object x.y and see the changes, but not rebind it.
> >
> > If you need to see rebindings, you can't use the "from x import y" form,
> > or at a minimum do it as:
> >
> >
> > import x
> >
> > from x import y
> >
> > then later to get rebindings to x.y do a
> >
> > y = x.y
> >
> > to rebind to the current x.y object.
> >
> > --
> > Richard Damon
> Yes, an extra "import x" will solve my problem too! Sometimes I am wondering 
> why "from x import y" hides x? hum...can't figure out the reason:-)
>

"from x import y" doesn't hide x - it just grabs y. Python does what
you tell it to. :)

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