I am trying to install python 3.3.4 for the first time on Win Vista OS and it seems to install successfully but when I try to open the IDlE gui I get the error msg: IDLE subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection.
I have tried uninstalling and reinstalling, have tried turning off the firewall completely and have had no luck getting this to work. Everything I have read from people having similar problems is because they had a file in the wrong place or something similar. I have never used this program before, I haven't even been able to open it once so if there is a bad file then it lies with the installation process.
Someone please help, I am completely new to this and would very much like to learn to program with Python.
Related
I have a python game that is being run on wl2 and I would like the display to be in windows. I have tried to use the code below in my python program but it just gets stuck because it is not the correct display. I have also checked out this question but it did not seem to be an answer I could apply to this project. I could just run this program in windows but that causes a whole lot of other problems and will probably have to be in another question. Any help would be greatly appreciated!
I wish I could share the program but unfortunately it's for a ctf and should not be posted :(
I used this question for reference to the code below:
import os
os.environ["SDL_VIDEODRIVER"] = "dummy"
Without the above code:
With the above code (seems to be working but nothing shows up):
Audio
You can not redirect audio (ALSA) with WSL2. You could still try something streaming with ffmpeg from linux to windows.
Graphics
Setup an X server on your windows host and provide a DISPLAY environment variable on WSL to it, e.g.
DISPLAY=172.24.144.1:0
On WSL2 localhost or 127.0.0.1 unfortunately does not work, so you have to check your machine adapter addresses on Windows side.
There are plenty of them. I used very simple (and handy) Xming X Server for Windows aka XLaunch.
This one is compatible with opengl X11 drivers.
UPDATE
You can nicely automate setting properly DISPLAY variable by adding this line to the ~/.bashrc file in your WSL2 machine:
export DISPLAY=`grep -oP "(?<=nameserver ).+" /etc/resolv.conf`:0.0
I'm lost with Python. After troubleshooting with a friend through Discord for literally months I am about to give up. This is my last attempt at trying to get Python fixed on my Windows 10 laptop.
I'm using a Lenovo Legion 5, bought the laptop in November 2020. I've not been able to get anything related to Python to run in the CMD window. I can run Python no problem, but nothing I have installed through pip has ever worked. I can use virtualenvs, but only through PyCharm for example. Python has never really worked through the command line.
Yes I tried reopening the CMD window, rebooted the system many times, ran the CMD as administrator, installed the path variables for both Python and esptool.py but nothing seems to help.
I honestly don't know where to start because none of the 250+ websites I've visited to so far that suggested a fix for any kind of issue I've been experiencing with Python has been working. I can run Python fine by the way, just none of the things installed through pip will work.
Let's start with a use-case:
I'm trying to run esptool.py so installed it with pip install esptool. This install worked fine, and I can confirm it is installed with pip show -f esptool.
However, when running esptool.py version it told me:
'esptool.py' is not recognized as an internal or external command, operable program or batch file.
So I added the local folder from the previous step to the %PATH% variables, after running esptool.py version it gave me a popup asking me with what kind of program I should open this, I didn't select to open with this kind of program from now on. This makes it so that I do not get an error, what now happens is that another window quickly opens and then exits without an error code. So I have no clue what's happening.
What should happen is that it should tell me which version is installed in the CMD window.
There have been a few other things going on with my Windows 10 install, for one, the username that I used during the installation wasn't used to create the user directory. Windows 10 somehow instead chose a name that was related to the first 5 characters of my email address, which is totally strange as I haven't used that string in the installation of Windows 10 at all. This was a fresh install on a new laptop.
Now, after an update of Win10 my user icon doesn't display anymore and I had to change ownership of the 'Windows Apps' folder in order to be able to access it. Changing the ownership also changed the name I now see on the login screen when I boot up the laptop. It changed from the 5 first chars of my email address to my full name in the login screen, only because I took ownership of this folder so I could access it.
There have been a lot of things going on that I think should not be changing all the time, things to do with administrator rights, ownership, etc.
Now, since opening esptool.py doesn't open it, but also doesn't show me an error, I'm clueless and the only thing I can think of is doing a fresh system install, but I have a bunch of projects going on for which I need this laptop in working order and I don't have the mental health (due to corona) left to do a fresh system install. I'm worn down. Not in a dramatic way, I just don't have the spare energy to go through the whole process. So I'm hoping someone can point me in the right way to troubleshoot why my Python doesn't want to work natively.
What happens when running esptool.py version is that I can see it opens a Python window, but without showing any content it closes within a few milliseconds.
What is going on, how do I continue? I hope someone knows how to troubleshoot my system, to find the core of the problem.
It apparently was rather simple. First of all, thanks for the replies! And second of all, thanks for pointing me to superuser.com I wasn't aware of the site and will continue there.
The fix was to use python -m pip install esptool as suggested by Valentin Kuhn.
To answer AKD, I have a lot of experience with programming on my MacBook, but I'm not experienced with actually maintaining the system side, I'm a creative user. It's just that ever since I got a Windows laptop it's been nothing but trouble and after months of chatting about each individual issue with people on Discord nobody has been able to find a solution. I'm not expecting a GUI, just a simple "esptool.py v3.0" was the answer I was expecting from the command line.
Now what I don't understand is that I've never found any hint to anyone suggesting python -m. I will get on superuser to find out more about why the standard instructions that work for most people, don't work for me.
Sorry for using the wrong site for my question, I came on here through another related question and it was past my bedtime and I wasn't thinking clear.
I am new to Python and recently installed Python 3.6 on Windows 10. When I try to open IDLE, Python's IDE, I keep getting a message saying that it can not establish a subprocess. I have tried uninstalling and installing several times. I have seen several forums which say that there could be a .py file that is in the directory that is messing up IDLE. This is not my case, as I have not even been able to start using Python and I do not have a firewall either. Can someone tell me how I can get IDLE to work?
In this answer I collected together 9 possible reasons for the message, as reported in various SO answers.
If you try to start IDLE from a command line (Command Prompt or PowerShell)
> python -m idlelib # idlelib.idle for 2.x
one might get a helpful error message.
I work with over 30 Python developers and without fail when this happens they were behind a proxy / vpn. Turn off your proxy / vpn and it will work. Must have had this happen hundreds of times and this solution always worked.
to give a bit of background I'm trying to use TensorFlow object detection api. I have been following this tutorial https://www.youtube.com/watch?v=MoMjIwGSFVQ
15 minutes into it he uses Spyder, and runs the python files on it. I've never used Spyder before, and for some reason it's not running my files at all? When I press run nothing is returned on the console.
So can anyone suggest a different IDE that I could use that would allow me to do the same things as he does? Or would anyone be able to tell me why Spyder might not be running. (I installed it in Linux terminal, and simply imported the file as a project as he did, and so I'm a bit stumped as to whats going wrong).
Thanks!
I have tried uninstalling it and have searched other answers. None of them have worked; IDLE opens, but I can't run anything I write.
In Windows 10
1. Type in "Controlled folder Access"
2. Select "Allow an app through Controlled folder access" Select yes to "UAC"
3. Click on "+ Add an allowed app"
4. Select "recently blocked apps"
5. Find the executable for the C:\Python27
6. Click the + to add it.
7. Select Close
Then try running the Python Shell again. This worked for me 100%
Also, add exception through Windows Firewall Python27 select Private and Public.
This question has been asked before. Based on previous answers, I compiled a list of possible causes and solution on CPython tracker issue 25514, post of 2016-01-18.
SO question 1 Causes people have found or think they have found.
Antivirus/firewall (4 people, linux iptables, Windows firewall, antivisus , so not a myth ;-)
Shadow files, as described [in the issue], and in the python directory (about as common; example user file names: tkinter,py, subprocess.py).
Registry problem (some people can fix, but most should re-install after complete removal).
Zombie pythonw process (kill with Windows Task manager).
Permissions (run as admin, though should not be needed with proper install)
?Multiple installed versions clash due to misconfiguration?
SO question 2 Add:
Running after stopping run with ^C (temporary, I believe Restart Shell will fix) Call this a timing issue. I have experienced temporary connection failures myself.
Modem reboot (rather obsolete answer for most of us).
?example program that reads and writes (test)
Someone somewhere reported that his problem was with network misconfiguration that affected the operation of the socket module that IDLE uses.
Last resort: start IDLE with -n command line option, as described in IDLE doc.
If you at the network environment then check on the secure Group (SG), to see if the user is listed under that group.
else as other had been suggested you have to have the (right click on the program the login as Admin right to enable the IDLE to run.
IDLE's subprocess didn't make a connection. Either IDLE can't start or a personal firewall software is blocking the connection.
Having had this problem myself I did an uninstall and created a new directory in the C drive and reinstalled in that folder, which worked for me.
First uninstall the application.Then reinstall it BUT at the time of reinstallation try -n at the end of location adress. It worked for me, you can copy the below text and paste it at the location while installing it.
“C:\Program Files\Python32\pythonw.exe” lib\idlelib\idle.py -n