Pygame auto-py-to-exe gets stuck after selecting script location [duplicate] - pygame

I try to install Auto-Py-to-exe but they have a lot of error appear during the installation but at the end it sais successfully installed, see picture below.
I have windows 10pro, PyCharm community 2020.3.3, and i use python 3.9.1 for almost all my projects.
I have uninstall auto-Py-to-exe, piwin, PYpiwin32, pywin32, PyInstaller. Close all the system and reboot, re-install all these module, but nothing seem to work. It the same error when i use Python 3.6 or 3.7. the same error arrived in PyCharm terminal and in the promt(cmd) window terminal.
C:\Windows\system32>auto-py-to-exe
Traceback (most recent call last):
File "c:\users\mélissa\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None, File "c:\users\mélissa\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals) File "C:\Users\Mélissa\AppData\Local\Programs\Python\Python39\Scripts\auto-py-to-exe.exe\__main__.py", line 7, in <module>
File "c:\users\mélissa\appdata\local\programs\python\python39\lib\site-packages\auto_py_to_exe\__main__.py", line 291, in run
if eel.chrome.get_instance_path() is not None and not disable_chrome:AttributeError: module 'eel.chrome' has no attribute 'get_instance_path'
C:\Windows\system32>
I have made the update of PIP, EEL, PYInstaller( the upper version they want to install is 3.2.1, the other fail), gevent and greenlet but i receive always the same error message.
I don't know what to do. I have check here for answer or direction to resolve my problem but i find nothing for now.
the error message in PYCharm, it the same in window terminal

It appears, while looking at the traceback, that the error is in the source code, and not your own execution. Looking through the auto-py-to-exe GitHub repository files, it seems that the package just uses pyinstaller to convert the python script(s) to executable files. In this case, I would recommend just using pyinstaller itself.
To convetr the .py file to a single file, run:
pyinstaller my_script.py --onefile --windowed
The .exe file will appear in a folder dist/ (created during the build). The build/ folder along with other files created during the process can be deleted.

Related

PyModbusTCP module installation on windows pc

Last year, I made a program using the PyModbusTCP module on a raspberry Pi. Now I want to try my programs again on a windows pc but I can't seem to get my installations correct.
Here is some info:
project has a venv folder and a main.py next to it. I am not sure if the main.py has to be in the venv folder or not.
PyModbusTCP has been installed using git cmd with the command "pip3 install pyModbusTCP" and gives me a message "requirement already satisfied..."
Message in console after using a basic program provided by the pymodbustcp dev:
C:\Users\SESA681397\PycharmProjects\pythonProject\venv\Scripts\python.exe C:\Users\SESA681397\PycharmProjects\pythonProject\test.py
Traceback (most recent call last):
File "C:\Users\SESA681397\PycharmProjects\pythonProject\test.py", line 1, in <module>
from pyModbusTCP.client import ModbusClient
ModuleNotFoundError: No module named 'pyModbusTCP'
Thank you for your time reading this, it is probably a stupid problem but i don't know it.
I tried to get the folder correctly and see if pymodbustcp module is correctly installed.
Tried to see if the module is installed and if my previous programs worked.

Django Elastic Beanstalk to RDS MySQL problems connecting

I'm trying to connect my Django Elastic Beanstalk to my RDS MySQL. My Django works with my RDS MySQL through localhost, but when trying to upload my Django to Elastic Beanstalk I get "failed to deploy application" and AWS shows errors (below). My project has mysqlclient in requirements.txt, like here:
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-rds.html
According to that page, that should be enough. I've of course tried to search for similar questions but haven't had success so far. I've noticed that many questions refer to needing a packages.config file inside .ebextensions, I tried many of those suggestions without success. Is that the problem? Why wouldn't that be mentioned on the AWS page?
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
/bin/sh: mysql_config: command not found
/bin/sh: mariadb_config: command not found
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-r0dz9d2g/mysqlclient_f2b5c53e43a648c284b06f7af63d9855/setup.py", line 15, in <module>
metadata, options = get_config()
File "/tmp/pip-install-r0dz9d2g/mysqlclient_f2b5c53e43a648c284b06f7af63d9855/setup_posix.py", line 70, in get_config
libs = mysql_config("libs")
File "/tmp/pip-install-r0dz9d2g/mysqlclient_f2b5c53e43a648c284b06f7af63d9855/setup_posix.py", line 31, in mysql_config
raise OSError("{} not found".format(_mysql_config_path))
OSError: mysql_config not found
mysql_config --version
mariadb_config --version
mysql_config --libs
[end of output]
Answering my own question. I asked something similar later AWS Elastic Beanstalk RDS MacOS mysqlclient not working and got help.
The answer was indeed the packages.config file with yum installing the necessary files (check the link above). There was something off somewhere else in my code but the errors that I got were the same as above, even though packages.config was setup properly. I figured it out because I tried to set it back to the SQLite database and upload it to Elastic Beanstalk and it didn't work. (I don't remember what errors I got sorry, I was stressed out, I think the "111: Connection refused" errors again though.)
The way I got things working was to delete all of my configuration files and start again from the regular finished project and then follow the tutorials (like I was doing before): https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-rds.html#python-rds-connect
From there, I added a packages.config file inside my .ebextensions folder with the following code...
packages:
yum:
python3-devel: []
mariadb-devel: []
...as is noted in my other question linked to above as well as here: mysqlclient installation error in AWS Elastic Beanstalk
I also needed gunicorn and a Procfile, I had that problem solved before anyway but it's worth mentioning in case you're here because of problems with Elastic Beanstalk and RDS.
I also didn't understand if I could use yum in the packages.config file if I didn't have it on my computer, especially since I use MacOS and it's not common to use yum on MacOS. That question was answered in my other question linked to at the top of this answer, the answer being that you do not need yum on your computer in this case, because yum is being used in this case by the Amazon Linux 2 server from Elastic Beanstalk.

from flask_mysqldb import MySQL

EDIT: Problem resolved. I was able to finally figure out the problem with some help from another student in the Udemy class along with the answer from Isaac_R here. I had to edit my .bash_profile with the following two lines of code and I am able to install MySQLdb and it is working as intended now. Here are the two lines I added to my .bash_profile
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
EDIT #2: I just started another mysql project in a new file, I had to run
pip3 install mysqlclient
before I could install mysqldb, just a heads up to someone who may have this issue like I did.
I am totally new to coding so please excuse my potential ignorance, I am trying my best to learn something new and it was going well until I ran into this issue that I am unable to get passed. I am on a Mac with 10.15.4 in python3.8.2 trying to create a MySQL database in order to use in a blog I am attempting to build. I have installed the mysql client along with pip3 install flask-mysqldb. I get successful conformation of the install, here is where my problems start. In Atom I am using the command from ''flask_mysqldb import MySQL'' to which I receive the error of the following
Traceback (most recent call last):
File "app.py", line 3, in <module>
from flask_mysqldb import MySQL
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask_mysqldb/__init__.py", line 1,
in <module>
import MySQLdb
File "IndentationError: unexpected indent
(venv) tylernelson#Tylers-MacBook-Air My Project % python3 app.py
Traceback (most recent call last):
File "app.py", line 3, in <module>
from flask_mysqldb import MySQL
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask_mysqldb/__init__.py", line 1,
in <module>
import MySQLdb
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/MySQLdb/__init__.py", line 18, in <
module>
from . import _mysql
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/MySQLdb/_mysql.cpython-
38-darwin.so, 2): Library not loaded: #rpath/libmysqlclient.21.dylib
Referenced from: /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/MySQLdb/_mysql.cpython-3
8-darwin.so
Reason: image not found"
I am able to post my entire (all be it super short) code file also if that will help resolve the problem. Thank you so much for your ideas and help!
I went thru the same issue, I found the best solutions within this question:
Python mysqldb: Library not loaded: libmysqlclient.18.dylib
I will recommend you to go thru all the options listed there, in my case run the command
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
solved my issues, most of the time when mysql gets installed the mysql directory should be renamed to just mysql.

TortoiseHg error running HG

I'm running into an error when pushing a local repository to the master repository located on a network share in Windows 7. I've added a hook on the master repository to perform "hg update" on push. When I'm running push from the local repository in the TortoiseHg, I get this error in the console:
Traceback (most recent call last):
File "c:\Python26\lib\site-packages\py2exe\boot_common.py", line 92, in <module>
ImportError: No module named linecache
Traceback (most recent call last):
File "<install zipextimporter>", line 1, in <module>
ImportError: No module named zipextimporter
Traceback (most recent call last):
File "hg", line 10, in <module>
ImportError: No module named os
warning: changegroup hook exited with status 255
The push happens, but does not successfully execute the hook. Furthermore, it seems I get this error all the time I run the "hg" command in the command line, except when running it inside the C:\Program Files\TortoiseHg directory. I've put the "C:\Program Files\TortoiseHg" in the PATH environment variable, but without any success. The system is Windows 7 x64.
In general TortoiseHg seem to work, like commit, update, push, pull... But finer details like hooks seem to not work. I've installed Tortoise 3.5.1 ONLY, without any Mercurial or Python. Here is where I've installed it from:
http://bitbucket.org/tortoisehg/files/downloads/tortoisehg-3.5.1-x64.msi
http://tortoisehg.bitbucket.io/download/index.html
Can somebody help me? I've seen a similar question on StackOverflow, but the person had both Mercurial and TortoiseHg installed.
So, why do I get these errors when running hg in the command line? Why pushing from TortoiseHg GUI doesn't successfully execute the hook on the remote repository?
If traceback is from push-target, then
You have Python 2.6 on it ('File "c:\Python26\lib\site-packages\py2exe\boot_common.py"...')
Mercurial 3.5 (thus - TortoiseHG also) dropped compatibility with Python 2.6, AFAICR, but:
THG uses Python's modules, if $PYTHON part is earlier in PATH and hg called outside THG home (in the latter case bundled with THG modules used); and pwd for running hook is always repo-dir
Change order in PATH (TBT!) or update Python to 2.7 or remove current Python from PATH
Why pushing from TortoiseHg GUI doesn't successfully execute the hook on the remote repository?
Because:
hook is push-target task, unrelated to push-source
You have troubles with hg (called in hook) on server's side, which are not related to client's THG

Exception raised when running ipython notebook

I used to have ipython notebook working correctly in fedora, but then tried to get ipython notebook for julia with Pkg.build("IJulia") and Pkg.add("IJulia").
After doing this and updating my ipython version with pip I could not run ipython notebook anymore, the next exception was raised over and over again:
ERROR:root:Exception in I/O handler for fd 6
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/zmq/eventloop/ioloop.py", line 346, in start
self._handlers[fd](fd, events)
KeyError: 6
^C2014-08-12 22:51:35.024 [NotebookApp] CRITICAL | received signal 2, stopping
Any help would be very much appreciated.
Thanks in advance :)
Getting IJulia to work is lot easier now, Pkg.add("IJulia") will search for jupyter or ipython in PATH, if not found it will use Conda.jl to install the dependencies. Another option which was tried successfully by the OP is to separately install Jupyter(which comes along Anaconda) to system path, and then install IJulia. Then should be able to open the notebooks by,
julia>using IJulia
julia>notebook
Alternatively you can open a notebook by running jupyter notebook in the command line.
PS : Credits to OP and commenters.