how to install pyaudio module in google cloud shell? - pyaudio

Error:
raise AttributeError("Could not find PyAudio; check installation")
AttributeError: Could not find PyAudio; check installation
I tried all of these commands:
sudo pip install pyaudio,
sudo apt-get install python-pyaudio ,
sudo pip install pyaudio ,
sudo pip install --upgrade pyaudio.

First, undo what you have done.
Then try to install it following their documentation for Debian based versions:
$ sudo apt install portaudio19-dev python-all-dev
followed by
$ sudo apt install python-pyaudio for python 2 version
OR
$ sudo apt install python-pyaudio for python 3 version.

Related

How to install mysql workbench in debian buster?

I tried the following commands :
sudo dpkg -i mysql-apt-config_0.3.5-1debian8_all.deb
sudo apt-get update
sudo apt-get install mysql-workbench-community
but on searching mysql-workbench-community
sudo apt-cache search workbench | grep mysql
returns nothing.
And
sudo apt-get install mysql-workbench-community
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mysql-workbench-community
What to do ?
I did manage to install without issues MySQL Workbench 8.0.19 version from an Ubuntu package in Debian Buster, with the command:
sudo dpkg -i mysql-workbench-community_8.0.19-1ubuntu18.04_amd64.deb
First you must download the package from the mysql website:
Just select Ubuntu Linux operating system and 18.04 version (19.10 version had broken dependencies) .
Hope this helps.
MySQL Workbench mysql-workbench has been removed from Debian buster due to a release-critical bug.
https://tracker.debian.org/pkg/mysql-workbench
https://tracker.debian.org/news/943250/mysql-workbench-removed-from-testing/
https://bugs.debian.org/867943
https://bugs.mysql.com/bug.php?id=89898
It can also be installed from Snapcraft. I haven't used it that much, but apparently it works. First you need to enable snapd:
$ sudo apt update
$ sudo apt install snapd
$ sudo snap install core
Then install MySQL workbench (community edition):
$ sudo snap install mysql-workbench-community
If you want to delete it, simply:
$ sudo snap remove mysql-workbench-community
I was able to install the latest version of MySQL Workbench (as of this writing) on Debian 10 using this method:
sudo apt install ./mysql-workbench-community_8.0.23-1ubuntu20.10_amd64.deb
A couple dependencies were missing so I subsequently ran:
sudo apt --fix-broken install
Just started using it, but MySQL Workbench seems to be running fine. It's also worth mentioning the link below states MySQL Workbench community is not available on Debian, although I'm not sure why this is the case.
mysql-workbench-community - MySQL Workbench (not available for Debian
platforms)
https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/#repo-qg-apt-available
Command line to install mysql on Debian 10:
$ sudo apt update
$ sudo apt upgrade
$ wget http://repo.mysql.com/mysql-apt-config_0.8.13-1_all.deb
$ sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb
Remember to make safe passwords with lettler numbers and symbols
$ sudo apt update
$ sudo apt install mysql-server
$ sudo apt-get build-dep mysql-server
$ wget https://downloads.mysql.com/archives/get/file/mysql-workbench-community_8.0.16-1ubuntu18.04_amd64.deb
$ sudo dpkg -i mysql-workbench-community_8.0.16-1ubuntu18.04_amd64.deb
$ sudo apt install -f
$ sudo dpkg -i mysql-workbench-community_8.0.16-1ubuntu18.04_amd64.deb
have a nice coding!

No package msyql-server available

I'm trying to set up MySQL on an Amazon Linux instance, I've tried everything (and with the -y option as well):
$ sudo yum install mysql-server
$ sudo yum install mysql56-server
$ sudo yum install mysql-community-server
I keep getting the "No package msqql-server available", "No package msyql56-server available", etc...
I've also ran yum clean all, yum update all, etc...
I'm assuming I have to install the RPM, but I don't know what version to install and while there is documentation for CentOS, there is little documentation specifically for Amazon Linux for setting up MySQL.
And these instructions didn't work as I got the error message "No package mysql56-server available" https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html
This worked:
wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
sudo yum localinstall mysql57-community-release-el7-8.noarch.rpm
sudo yum install mysql-community-server
UPDATE for 2022:
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
sudo yum localinstall mysql57-community-release-el7-8.noarch.rpm
sudo yum install mysql-community-server
service mysqld start
ref:
https://support.cpanel.net/hc/en-us/articles/4419382481815?input_string=gpg+keys+problem+with+mysql+5.7

Unable to install the Elastic Beanstalk CLI on Ubuntu

I am trying to install the Elastic Beanstalk CLI (awsebcli) on a fresh Ubuntu 14.04 (on Linux subsystem for Windows) using sudo pip install awsebcli, but launching the eb command just returns the following error:
flavien#XPS-FLAVIEN:~$ eb
Traceback (most recent call last):
File "/usr/local/bin/eb", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3036, in <module>
#_call_aside
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3020, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3049, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 654, in _build_master
ws.require(__requires__)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 968, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 854, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'termcolor==1.1.0' distribution was not found and is required by awsebcli
Any idea what might be going wrong?
You can reinstall awsebcli with below command if you have issues after installing it:
sudo pip3 install awsebcli --force-reinstall --upgrade
Once its installed check where its installed:
which eb
$ /usr/local/bin/eb #i got eb installed in this path
Next set the path:
export PATH=/usr/local/bin:$PATH
Then run
eb --version
EB CLI 3.14.6 (Python 3.5.2) #this is my installed version
First install the pip separably and try with this command
pip install --upgrade --user awsebcli
I had awsebcli being installed for Python 2.7 but for some reason running eb needed them for Python 3.x so doing this worked :
$ sudo -H pip3 install --upgrade --user awsebcli
After installing all the required wheels eb worked fine :
$ eb --version
EB CLI 3.14.3 (Python 3.5.2)
Also don't forget to add ~/.local/bin to your PATH variable in ~/.bash_profile
The previous answer helped me to figure this one out.
My detail, I had to install a newer version of python than 2.7, one that supported the --trusted-host switch to allow me to get all of my dependencies:
What I ran:
pip --cert zxroot.pem --trusted-host pypi.python.org --proxy [ProxyServer] install --upgrade --user awsebcli
Once I ran that reinstall using the --upgrade switch, eb finally worked:
eb --version
EB CLI 3.10.5 (Python 3.3.1)
I know this is very specific to my particulars but it might help someone else.
Good luck.
The problem is you are missing quite a few applications required by the scripts to compile.
The following installation steps are required prior to running the EB CLI scripts.
As I'm a windows user I created a clean VirtualBox VM install of Ubuntu 18.04.2
Update Ubuntu
sudo apt update
sudo apt upgrade
sudo reboot
Install curl,wget
sudo apt install curl
sudo apt install wget
Install zlib
sudo apt-get install zlib1g-dev
Install libffi
sudo apt-get install libffi libffi5-dev
Install OpenSSL
sudo apt-get install libssl-dev
Install gcc
sudo apt-get install build-essential
sudo apt install libx11-dev
gcc --version
make -v
Install Python 3.7
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.7
python3.7 --version
alias python='python3.7'
Install Git
sudo apt install git
After this run the EB CLI
You should see these 5 successful progress steps
Creating exclusive virtualenv for EBCLI
Activating virtualenv
Installing EBCLI
Creating EB wrappers
Finishing up
Success!
Try This:
sudo chown -R username:username ~/.local/
# add to ./*shrc
export PATH=$PATH:~/.local/bin/
pip install --upgrade --user awsebcli
eb --version
#EB CLI 3.10.1 (Python 2.7.1)

issues in importing nltk, giving errors when ran on python3 prompt

I have installed nltk on python3.5 version using command:
sudo apt-get install python3-nltk
when this did not work, I also tried using pip
when I tried checking the installations on python3 prompt it is giving me the error as this:
enter image description here
how can I resolve this error?
You can install NLTK through PIP. First of all you have to install pip for python3.
sudo apt-get install python3-pip
then check if pip installed successfully by running:
pip3 -V
and you have to take something like this
pip 9.0.1 from /usr/lib/python3.6/site-packages (python 3.6)
After use pip3 to install nltk by running:
sudo pip3 install -U nltk

installing mysql connector for python 3 in raspberry pi

I am new at using raspberry pi.
I have a python 3.4 program that connects to a database on hostinger server.
I want to install mysql connector in raspberry pi.I searched a lot but I was not able to find answers . any help would be appreciated
Before you install, it is important to run update and upgrade;
sudo apt-get update
sudo apt-get upgrade
Either install connector for Python 2;
sudo apt-get -y install python-mysql.connector
Or install connector for Python 3;
sudo apt-get -y install python3-mysql.connector
I found no way to install mysql-connector-python that I used with windows.
for python 3.4 I used the command
sudo python3 -m pip install pymysql
for python 2.7 you can use following commands
sudo apt-get install python-mysqldb
or
sudo apt-get install python-pip
pip install pymysql
Just use $sudo apt-get install python3-mysqldb and it works on pi-3.