currently we have an MSIX package deployed for python 3.9 on Windows 10 via app attach (vhd stage and register).
Everything works fine except the IDLE interpreter. Currently as a workaround we can call it via cmd using the python shell.
However if we try to run it from start menu, nothing happens.
We tried defining the system path environment variables for the same while creating the MSIX package (C:\Program Files\Python39\Lib\idlelib) but no success.
Any help is much appreciated.
Related
I'm running a Mac Pro 2021 model version 12.6. For some reason, my vscode will not run Python anymore when I tried using a program. I switched over to the cloud-based version for a while and now switched back to the application. It says that it could not find Python in my files. I believe both VSCode and my Mac are updated up to date. I installed python 3.11.0 for Mac, but no progress. I also tried running the update shell.command and the certificate commands as a part of the download in the vscode terminal, but it did not help. I also reinstalled the Python
v2022.16.1 Vscode extension and restarted the program. I still get the same error.
Explained above.
Have you tried Shift + Command + P type "Python: Select interpreter" yet?
Usually, all installed Python interpreters show up here, and you can also enter a path to a Python interpreter on your system.
I have updated my mac's OS and when I try to run the same commands that I did prior to the update (see file, it was simply just yarn), I get a vomit of errors on my terminal and I get a system prompt that states: The "make" command requires the command line developer tools. Would you like to install the tools now? After I click Install it takes about 20 minutes and it says installation finished, only to have the same behavior when I run the same command in my terminal.
Any one else a developer using Ventura running into weird problems running their code base?
Will be happy to share my output logs if somebody cares to help.
Did exactly what system prompts said, only to give me the same behavior when trying to run my code locally. It is in a feedback loop and am un sure how to approach it at this point.
I have a few python projects, that I am the only one working on. The environment is setup via venv. However, I cannot use the remote Python venv environment locally. I am newer to python. Locally, I am mounting the remote directory via ExpanDrive, connecting via SFTP on my mac.
Reason for this setup is some scripts are running via CRON periodically and, centralization. Appreciate any suggestions!
Figured it out.
Installed remote-ssh in vscode and that solved the problem.
How can I make my GTK3+ Python script work outside of Msys2's own Python interpreter, into my own venv (virtual environment) Python3 interpreter? I want to prepare my Python 3 script for distribution to other computers, but without Msys2.
I'm using Windows 10.
I've successfully followed the instructions on GTK's website, to download GTK3+ and the Python bindings, in Windows.
I've installed GTK3+ and the Python bindings using MSYS2. My script runs successfully within MSYS2's Python3 interpreter in C:\msys64\mingw64\bin. However, I want to run my Python script outside of MSYS2, with a separate Python 3 interpreter (venv) - not the one in MSYS2.
From my research, it seems that I need to copy the GTK3 .dll files and icons from
C:\msys64\mingw64\bin
and C:\msys64\mingw64\share
to the Python3 interpreter path that I want, with my script files in there too.
But when I attempt to run my script in the virtual environment, I get:
builtins.ImportError: cannot import name '_gi' from 'gi'
Any ideas? Thanks.
I don't know if that is possible.
But if the final intent is to distribute your app, then you should install PyInstaller inside MSYS2 and generate an executable there. Then you'll be able to distribute and execute your app on any Windows machine.
It will only be possible to run your program using the MSYS2 Python interpreter and with all of the required libraries. You can't just copy files and then run them with the Windows Python interpreter that was built using MSVC.
PyInstaller is a good solution to package an app with the interpreter and all of the libraries. The issue you mentioned about getting errors about no module named '_struct' has been fixed.
I have two Windows 7 machines. On one machine I can run python scripts by double clicking on the .py file, however on the other machine the script does not execute, the command prompt will flash quickly and the script does not execute. I can execute scripts on both machines using the command line. I have the same version of python installed on both machines.
How do I ensure that a python script can be executed by double clicking the script on Windows 7?
Step 1. Check if your .py files are associated with "python launcher" (Not just "python"). You can check that by right clicking the .py file and see:
In my case, I have two machines of Windows 10. The one with Python 3.6 installed by choosing "Install Now" works perfectly. The another one which having the same version of python installed in a customized location has problems. It seems nothing to do with the environment path setting, as I could run python in the console mode correctly. So at the end, I was forced to uninstall the python, (then removing all the related paths manually if needed), and install it again with default setting "Install Now".