Why can I not run pyaudio in my command promt? - python

Very fresh to coding, I am trying to create a speech to text app, I am using assembly ai, following their tutorial which has gone all smoothly. However I always seem to hit these brick walls (not the first time I am trying to create a text to speech). When trying to run in command prompt, I am getting an error of some sort. Please refer to image ---> (https://i.stack.imgur.com/1Jbku.jpg)
I am quite lost, I am not sure if I am entering something wrong to make it run.

Related

Using Pygame apps made with py2app shows error when running the file. (MacOS)

I have been learning pygame and I enjoy making the better ones into apps to play later. But I have noticed that the ones that show images give me an error message when ran it.Image here(https://i.stack.imgur.com/dpdty.png)
I was expecting that the app would just run like normal. But instead it gives me an error message.

Python - Importing YFinance using task scheduler crashes the program, but when running through Spyder it works fine

Background: Hi All. New to programing here. I am developing a algorithm that periodically checks stock data using YFinance, and then send an update email to specified inboxes. The next iteration I am developing I would like to run at specific times during the day, and using Windows Task Scheduler appears to be the best way, and the approach I am taking to do so.
Description of issue: When running the algorithm using Spyder and pressing the "Play" button, the algorithm works perfect. When I use Task Scheduler, it crashes when it gets to the line "import yfinance as YF" I receive error code 0x2. I am uncertain what is going wrong. Any help is appreciated, Thanks.

Cant run a code in vscode, instead of showing it to me in the terminal section, it sends me to the output section

I'm a noob in computer programming, today i installed vscode to learn python, everything was right, i run short and simple lines of code installed some extensions, but i dont know what happened, I'm not sure if i changed some configuration but when i try to run little lines of code (with the button) instead of running it and showing it to me in the "terminal section", it sends me to the "output" section and it just says that the code already run and its done.
Do somebody knows how to solve it please, it really makes me sad that i just ruined this program because its my first day and this already screw it.
As you can see in the picture, i run the code and it shows off something different in the output section, i wrote that but later changed it. It seem like it runs the file but only when i save it. :(
You must save the file to get the new output everytime.
For running code in Terminal with the button -
It looks like you are using Code Runner vscode extension. Which by default uses Output section to show output and cannot take input. You can change this behavior of that extension by pressing ctrl + , and going into vscode settings. Then just search code runner run in terminal You'll see an option to enable Run in Terminal feature turn that on.

Unable to use turtle in Git Bash

I have only just begun to learn to code in Python. I have a bit of experience in HTML, but that's about it.
I am current taking the Intro to Programming nanodegree from Udacity.
The lessons I am working on is introducing students to using interactive mode via command line to test bits of code. The problem is that I have to use the python -i command to get into interactive mode, and I am unable to scroll through the history. The bigger problem, however, is that running things like the turtle module are spotty.
Following the instructions in the lesson, I am trying to run the following code:
import turtle
amy = turtle.Turtle()
amy.forward(100)
amy.left(90)
amy.forward(100)
etc...
What ends up happening is I am able to import the turtle, assign it the name "amy", but then when I try to give it movement commands, nothing happens. the >>> disappears and Git Bash stops responding. I have to close the terminal and start a new terminal everything.
Also, being unable to use the arrow keys to cycle through command history is frustrating and retyping the code over and over again any time a mistake is time consuming.
Are there any better ways to go about using the CLI to fulfill the requirements of the course? (I didn't say which requirements, because I'm not entirely sure to what extent the course will require me to utilize the CLI on upcoming projects.)
This problem has frustrated me so much and I am not able to get any useful information from the "mentors" on the Udacity forums, so I have basically stopped progressing through the course.
Any help is much appreciated.
One possible alternative would be to use, instead of a git bash shell, a true Linux session through WSL2 if you are using a recent enough Windows version.
That way, you would benefit from a regular shell, in which history would be available through arrow keys to cycle through.
I'm doing the same course and had the same problem. Found a solution at https://granatguitar.com/why-can't-i-run-python-in-git-bash-on-windows/
I tested it first from the $ prompt and it seemed to work OK, so then I set it up in .bash_profile.
I didn't have a .bash_profile file so I created one in ~ and edited it as granat suggested.
I added the line alias pythoni="winpty python" and saved the file. (I used pythoni rather than python because, well, it's python interactive.)
Now, when I enter pythoni at the $ prompt it starts python in interactive mode....and it works! All the problems with hanging and not moving the turtles have gone.

How can I embed a windows system terminal/console in a PyQt GUI Application?

im trying to have a console inside the pyqt gui i have been working on this for so long trying so many different things and trying to explain it to so many people here is what i need.
i am looking to create a cmd inside of my Pyqt4 Gui. like shown in this picture
MIND YOU this is just me moving the cmd from the program into the gui. in the picture below i have scribbled out with a red pen the boarder of the cmd(from the pythonw program) to show that i am looking to have the cmd inside not actually have the boarder. basically summed up i need a console embedded into the gui. that i can run commands threw it (NOT A PYTHON SHELL) only from the main code. my brain cant take the pain anymore and my tylenol is almost gone just from this one project. if some python master who thinks they could do this and would be willing to create this for me. i would appreciate it so much
if you want me to explain it to you in person you can join my discord server i will be here all day https://discord.gg/s63ZxTt

Categories

Resources