I just installed gnuradio-companion (for about the 10th time).
When I try to run it by clicking on gnuradio-companion.py in the bin folder all I get is a python screen with a blast of text that closes before I can see what it says. When I first tried it I got the errors about the paths not being right. I corrected them and now I just get this flash. Is there some way to keep the screen open so I can see the errors?
Background: I said this was (about) my 10th attempt. After many failures I got to the point that I had version 3.6.?.? running except it didn't have the source I needed (rtl-sdr). I found that if I installed version 3.7.?.? I could get some of the source components from 3.7 and copy them to the 3.6 folder but there were some osmosdr files I couldn't find. I decided that by now, after all these attempts, maybe I should uninstall everything associated with gnuradio and do a clean install using v3.7.13.4/v1.5 from http://www.gcndevelopment.com/gnuradio/downloads.htm
I assumed at that point that all I had to do was click on gnuradio-companion.py in the bin folder. Well, I had to make the python that came with this download the default for .py file types. Then I had to get the paths right (as I said above). Now I am stuck at the flashing screen. Did I miss something else in this install process?
Try putting input() at the end of the code to have it wait for user input before it finishes executing and closes
Related
I recently installed the Python VSCode extension, and when I did it popped up with a handy tutorial page.
However, after closing it, I cannot for the life of me figure out how to get this page back.
I've tried reinstalling the extension, checking through all of the commands, modifying settings, nothing seems to work.
Checking through the repo for the python extension, there seems to be a onWalkthrough:pythonWelcome that creates this page. However, I have absolutely no idea how to manually invoke this again.
Does anyone know how to do this? I know it's not strictly necessary, but I just assumed it would be easy and was surprised and stubbourn when it wasn't.
After asking the devs directly, it seems that it's extremely simple!
Get Started: Open Walkthrough... in the command palette will open a menu of available walkthroughs from extensions you've installed, including the Python one I was trying to find.
It has been removed, you can refer to these page for more details:
Should we not open the start page if a user already has a folder open?
Python Start Page
Welcome page opens while I am starting to type in a python file
Remove start page and its build dependencies
I would have 2 questions:
I opened a python file with Xcode and it seems to have recognized it, but still the syntax coloring doesn't seem like python, so how to make it correspond ?
I tried to create a new Python project with Xcode following the instructions on this website: https://ericasadun.com/2016/12/04/running-python-in-xcode-step-by-step/ , but gives me "ERROR: unknown command "$(SRCROOT)/Work.py". I want to precise that it didn't give me the executable directly I had to select it myself in "/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9". I tried some suggested fixes as changing the "$(SRCROOT)/Work.py" by the path till Work.py : "/Users/user/Downloads/Python/Work.py". But still it persisted on the same error. So the question is how to make Xcode run a python code given the issues I encountered ?
Thanks !
So I fixed it by searching Work.py file and where I saved it. After that hit right click on the Work.py file and click on Get Info. Expand General: and then copy the text from Where:. Paste that in that Argument box and close the windows. Everything should work now.
I was normally using python3.7.3 on my system(Windows 10). A couple of days earlier I noticed that the command prompt won't run any of my python programs. It did nothing, no response. I thought there is a problem displaying the output stream so I ran an infinite loop(and was expecting to terminate the process, ctrl^c) but again no response. Even python --version command won't work. I uninstalled python3.7.3, downloaded the latest python3.8.5, and again the same problem. image from my cmd line
please help me out. I use sublime text so I prefer running my codes through cmd.
Update: Here is another snap of my command line after running commands in one answer and comments.
Also, I think the problem lies within the PATH setting but PATHs are already added.
image to enviornment variables, image to system variables
It is possible you failed to add python to your path in the installer.
Image displaying adding python to your path in the installer
You also may have forgotten to disable the path limit in the final set up screen.
Image displaying increase path limit in the installer
If you navigate to C:\Users\chira\AppData\Local\Programs\Python\Python38-32 then run python --version do you get any output?
During a presentation yesterday I had a colleague run one of my scripts on a fresh installation of Python 3.8.1. It was able to create and write to a csv file in his folder (proof that the csv library was working correctly), but everything else failed due to not being able to find the needed files. To try and isolate the problem and figure out why, we tried the below simple script, which also failed.
He had this test.py script in "D:/TEST", which also contained some folders and image files. Running this script printed nothing to the console. No empty list, no error message, no newline. Maybe the print() function was also not working, but I didn't get around to testing that.
import os
print(os.listdir())
This script works fine on my computer and my other colleagues computers (all Windows 10, similar hardware). I didn't have time to look into the issue more thoroughly and don't have access to his computer anymore. What could be the problem? What other things could I have him look into in order to fix this? In case this problem appears again during a future presentation, what steps could I take to figure out the cause of it?
My colleague uninstalled Python and reinstalled it. After doing this apparently the "python" command will no longer run his scripts, but using "py" instead will. Now that he is using "py" to run his scripts, it is working as expected.
I installed Python 2.7.8 for a class about a week ago and I used it all week and it opened and worked. I even installed the updated ActiveTcl 8.5.15 when I heard about the IDLE crash issue. After installing ActiveTcl 8.5.15 it continued to work perfectly, but now whenever I try to open IDLE it opens for a second then crashes. After I try to open it and it crashes, the next time I try it just bounces on my dock and nothing happens. I've tried reinstalling and everything, but nothing has worked. As of now, I haven't found anyone else that has ever run into this problem.
Your afterthought comment has the answer: somehow, 'Shift' got re-written as 'shift' in one of two files. The fix is to change it back. I reproduced the error _tkinter.TclError: bad event type or keysym "shift" on Windows by editing each file. I will let you translate the file paths to osx paths.
.../python27/lib/idlelib/config-keys.def This file should not be touched after installation.
/users/Terry/.idlerc/config-keys.cfg This file is written if you edit Options / Idle preferences / Keys / Custom Key Bindings. It can also be edited by hand. It is read on startup if Use custom is checked.
One can delete any or all of the files in .idlerc and Idle will run.
I added a note about this specific report to a Python tracker issue. You are not, unfortunately, the first with a similar problem. Fixing this and similar problems is high on my priority list. I am very curious, however, which file is bad and how this happened. Did you edit key bindings either through the dialog or an editor? Or do you think something else corrupted the file?