Re: Persistent Error: Python was not found

2022-08-14 Thread Mike Dewhirst

Jonathan

This is what I would do ...

1.    Download Python from python.org not Microsoft

2.    Install as an expert or custom install to C:\Python310 rather than 
C:\Program files


3.    Ignore this point - I was going to mention VirtualEnv which comes 
later for software development and thereafter you don't need to put 
Python on the Windows path. As I said, ignore this point.


4.    Add C:\Python310\Scripts to the path (system or user)

5.    Add C:\Python310 to the path after C:\Python310\Scripts

6.    Open a cmd prompt and enter python to prove it starts then quit. 
Exit the cmd window


7.    Create a directory in the root of your user profile 
(C:\Users\Jonathan ??) called pythontest


8.    Save 'print("hello world")' in a text file called hello.py in the 
above directory


9.    Open a cmd prompt and type > python 
C:\Users\Jonathan\pythontest\hello.py


Should work.

If you want to execute a python script without first opening a cmd 
prompt, you need a bat file or shortcut which contains the command line 
you want executed. Give that a double-click and it should also work.


If Python is on the path you don't need to specify where it is.

You do need to tell Python what you want it to execute.

It is possible that you can associate .py files with Python but that 
would be a step too far for me.


Good luck

M

On 13/08/2022 9:55 pm, Jonathan Owah wrote:

Good day,
Great job on making Python easily accessible.

I'm using a  Windows 10, 64gb HP EliteBook.

I've been trying to configure my laptop to run python scripts.
This is the error I keep getting:
Python was not found; run without arguments to install from the Microsoft
Store, or disable this shortcut from Settings > Manage App Execution
Aliases.

Everything I've tried has failed.
I've uninstalled and reinstalled
I've added to path, both user and system path,manually and from fresh
installation
I've downloaded from Microsoft Store
I've gone to manage app aliases and switched off
I've used Git Bash, Powershell, cmd

I'm able to check my python version: 3.10.6.

I can't do anything else and it's really frustrating.

I've been at it for days, I don't know what else to do.

Thanks in advance for your help.

Regards



--
Signed email is an absolute defence against phishing. This email has
been signed with my private key. If you import my public key you can
automatically decrypt my signature and be sure it came from me. Just
ask and I'll send it to you. Your email software can handle signing.



OpenPGP_signature
Description: OpenPGP digital signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Python getting problem of installing pyqt5

2022-08-14 Thread Varad Gore
Collecting pyqt5
  Using cached PyQt5-5.15.7-cp37-abi3-win_amd64.whl (6.8 MB)
Requirement already satisfied: PyQt5-Qt5>=5.15.0 in 
c:\users\gorev\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages
 (from pyqt5) (5.15.2)
Requirement already satisfied: PyQt5-sip<13,>=12.11 in 
c:\users\gorev\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages
 (from pyqt5) (12.11.0)
Installing collected packages: pyqt5
  WARNING: The scripts pylupdate5.exe, pyrcc5.exe and pyuic5.exe are installed 
in 
'C:\Users\gorev\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts'
 which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this 
warning, use --no-warn-script-location.
Successfully installed pyqt5-5.15.7
(venv) PS C:\Users\gorev\OneDrive\Desktop\Medidost> ^C
(venv) PS C:\Users\gorev\OneDrive\Desktop\Medidost> pip install pyqt5-tools 
Collecting pyqt5-tools
  Using cached pyqt5_tools-5.15.4.3.2-py3-none-any.whl (29 kB)
Collecting pyqt5==5.15.4
  Using cached PyQt5-5.15.4.tar.gz (3.3 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [29 lines of output]
  Traceback (most recent call last):
File 
"C:\Users\gorev\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pip\_vendor\pep517\in_process\_in_process.py",
 line 156, in prepare_metadata_for_build_wheel
  hook = backend.prepare_metadata_for_build_wheel
  AttributeError: module 'sipbuild.api' has no attribute 
'prepare_metadata_for_build_wheel'

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
File 
"C:\Users\gorev\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pip\_vendor\pep517\in_process\_in_process.py",
 line 363, in 
  main()
File 
"C:\Users\gorev\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pip\_vendor\pep517\in_process\_in_process.py",
 line 345, in main
  json_out['return_val'] = hook(**hook_input['kwargs'])
File 
"C:\Users\gorev\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pip\_vendor\pep517\in_process\_in_process.py",
 line 160, in prepare_metadata_for_build_wheel
  whl_basename = backend.build_wheel(metadata_directory, 
config_settings)
File 
"C:\Users\gorev\AppData\Local\Temp\pip-build-env-tp5amvi7\overlay\Lib\site-packages\sipbuild\api.py",
 line 46, in build_wheel
  project = AbstractProject.bootstrap('wheel',
File 
"C:\Users\gorev\AppData\Local\Temp\pip-build-env-tp5amvi7\overlay\Lib\site-packages\sipbuild\abstract_project.py",
 line 87, in bootstrap
  project.setup(pyproject, tool, tool_description)
File 
"C:\Users\gorev\AppData\Local\Temp\pip-build-env-tp5amvi7\overlay\Lib\site-packages\sipbuild\project.py",
 line 584, in setup
  self.apply_user_defaults(tool)
File 
"C:\Users\gorev\AppData\Local\Temp\pip-install-gufhuvvi\pyqt5_1a911aba5155486d9ea117814aa4a43e\project.py",
 line 63, in apply_user_defaults
  super().apply_user_defaults(tool)
File 
"C:\Users\gorev\AppData\Local\Temp\pip-build-env-tp5amvi7\overlay\Lib\site-packages\pyqtbuild\project.py",
 line 70, in apply_user_defaults
  super().apply_user_defaults(tool)
File 
"C:\Users\gorev\AppData\Local\Temp\pip-build-env-tp5amvi7\overlay\Lib\site-packages\sipbuild\project.py",
 line 236, in apply_user_defaults
  self.builder.apply_user_defaults(tool)
File 
"C:\Users\gorev\AppData\Local\Temp\pip-build-env-tp5amvi7\overlay\Lib\site-packages\pyqtbuild\builder.py",
 line 67, in apply_user_defaults
  raise PyProjectOptionException('qmake',
  sipbuild.pyproject.PyProjectOptionException
  [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.
-- 
https://mail.python.org/mailman/listinfo/python-list


Persistent Error: Python was not found

2022-08-14 Thread Jonathan Owah
Good day,
Great job on making Python easily accessible.

I'm using a  Windows 10, 64gb HP EliteBook.

I've been trying to configure my laptop to run python scripts.
This is the error I keep getting:
Python was not found; run without arguments to install from the Microsoft
Store, or disable this shortcut from Settings > Manage App Execution
Aliases.

Everything I've tried has failed.
I've uninstalled and reinstalled
I've added to path, both user and system path,manually and from fresh
installation
I've downloaded from Microsoft Store
I've gone to manage app aliases and switched off
I've used Git Bash, Powershell, cmd

I'm able to check my python version: 3.10.6.

I can't do anything else and it's really frustrating.

I've been at it for days, I don't know what else to do.

Thanks in advance for your help.

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


Re: Conecting to MySQL

2022-08-14 Thread Michael Torrie
On 8/8/22 19:26, Guilherme Campos wrote:
> Hello folks,
> 
> trying to connect to MYSQL it appears the error msg below:
> InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306'
> (111 Connection refused)
> [image: conexao.png]
> How can i fix that.?

MySQL can listen on a local unix socket (named pipe in Windows), an
internet TCP/IP port, or both.  If your MySQL is running, it could be
listening on the local socket or named port, which has a different url
than localhost:3306.  MySQL can be configured to also listen on a TCP/IP
port, which is what you code is apparently expecting.

Although the fact that your MySQL Workbench cannot connect either
suggests that MySQL is not running at all.

Configuring MySQL is a bit beyond the scope of this list, although I'm
sure there are people here who know how to do it.  What OS are you using?
-- 
https://mail.python.org/mailman/listinfo/python-list


RE: [Tutor] (no subject)

2022-08-14 Thread avi.e.gross
How long?

Not fibbing but infinite is infinite and I simply so not have the time.

This is so such an EASY question that you need to show some work to interest
us.

You can do this in ANY programming language so explain if there is a reason
you ask here or ...

The real question is what you want. Do you want an algorithm, perhaps in a
function, that returns the first N numbers in the sequence, or one that can
start with an alternate sequences than the usual 0/1 or perhaps do you want
a generator that will return one number at a time infinitely, or until the
world ends, or someone pulls a power cord, whichever is sooner?


-Original Message-
From: Tutor  On Behalf Of
Phindile Julia
Sent: Sunday, August 14, 2022 12:49 PM
To: tu...@python.org
Subject: [Tutor] (no subject)

Hey how to create a Fibonacci list?
___
Tutor maillist  -  tu...@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

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


[Python-announce] NumPy 1.23.2 release

2022-08-14 Thread Charles R Harris
Hi All,

On behalf of the NumPy team, I am pleased to announce the release of
NumPy 1.23.2. NumPy 1.23.2 is a maintenance release that fixes bugs
discovered after the 1.23.1 release. Notable features are:

   - Typing changes needed for Python 3.11
   - Wheels for Python 3.11.0rc1

The Python versions supported for this release are 3.8-3.11. Wheels can be
downloaded from PyPI ; source
archives, release notes, and wheel hashes are available on Github
.

*Contributors*

A total of 9 people contributed to this release.  People with a "+" by their
names contributed a patch for the first time.

   - Alexander Grund +
   - Bas van Beek
   - Charles Harris
   - Jon Cusick +
   - Matti Picus
   - Michael Osthege +
   - Pal Barta +
   - Ross Barnowski
   - Sebastian Berg


*Pull requests merged*
A total of 15 pull requests were merged for this release.

   - #22030: ENH: Add ``__array_ufunc__`` typing support to the ``nin=1``
   ufuncs
   - #22031: MAINT, TYP: Fix ``np.angle`` dtype-overloads
   - #22032: MAINT: Do not let ``_GenericAlias`` wrap the underlying
   classes'...
   - #22033: TYP,MAINT: Allow ``einsum`` subscripts to be passed via
   integer...
   - #22034: MAINT,TYP: Add object-overloads for the ``np.generic`` rich
   comparisons
   - #22035: MAINT,TYP: Allow the ``squeeze`` and ``transpose`` method to...
   - #22036: BUG: Fix subarray to object cast ownership details
   - #22037: BUG: Use ``Popen`` to silently invoke f77 -v
   - #22038: BUG: Avoid errors on NULL during deepcopy
   - #22039: DOC: Add versionchanged for converter callable behavior.
   - #22057: MAINT: Quiet the anaconda uploads.
   - #22078: ENH: reorder includes for testing on top of system
   installations...
   - #22106: TST: fix test_linear_interpolation_formula_symmetric
   - #22107: BUG: Fix skip condition for test_loss_of_precision[complex256]
   - #22115: BLD: Build python3.11.0rc1 wheels.

Cheers,

Charles Harris
___
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