RE: [Tutor] (no subject)
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
Re: Conecting to MySQL
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
Persistent Error: Python was not found
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
Python getting problem of installing pyqt5
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
Re: Persistent Error: Python was not found
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
Re: Persistent Error: Python was not found
> On 15 Aug 2022, at 04:10, Jonathan Owah wrote: > > Good day, > Great job on making Python easily accessible. Try using the python launcher py.exe. It is documented here https://docs.python.org/3/using/windows.html#python-launcher-for-windows That page documents lots of other things that you may need to know about on windows. Barry > > 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 > -- https://mail.python.org/mailman/listinfo/python-list