How to install unavailable python packages in aws ec2 - amazon-web-services

I gonna install pyaudio and sounddevice packages via requirements.txt in EC2.
But it says raise OSError('PortAudio library not found')
So I tried to install libasound-dev for sounddevice...
Yum install libasound-dev
But it also said :
No package libasound-dev available
How should I do? I am in AWS EC2.

libasound-dev is for Ubuntu. For Amazon Linux 2 it should be:
sudo yum install alsa-lib-devel
For portaudio:
sudo amazon-linux-extras install epel -y
sudo yum install -y portaudio-devel portaudio

If you are in Window and gonna use pyaudio, you would use like this:
pip install pipwin
pipwin install pyaudio
This works well on Window.

Related

How to install python-mysqldb for Python 2.7 in Ubuntu 20.04 (Focal Fossa)?

I've tried "apt-get install python-mysqldb" which results in:
root#ps1svr:~# apt-get install python-mysqldb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-mysqldb is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'python-mysqldb' has no installation candidate
Note: "apt-get install python3-mysqldb" works, however I have a lot of code written for Python 2.x which no longer runs, and this is causing enough problems that I'm probably going to have to reinstall Ubuntu 18.04
Also you can just add the Ubuntu 18.04 repositoery to install the python-mysqldb package:
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu bionic main'
sudo apt update
sudo apt install -y python-mysqldb
This will download, build and install it for all users, using pip
sudo apt install libmysqlclient-dev python2.7-dev
wget https://bootstrap.pypa.io/get-pip.py
sudo python2.7 get-pip.py
sudo wget https://raw.githubusercontent.com/paulfitz/mysql-connector-c/master/include/my_config.h -O /usr/include/mysql/my_config.h
sudo pip2 install MySQL-python
Answer found from MySQLdb install error - _mysql.c:44:23: error: my_config.h: No such file or directory

How do I install boto3 without pip

My pip package is corrupted. I need to install boto3 using apt-get but I get the following error when I do apt-get install python-boto3:
E: Package 'python-boto3' has no installation candidate
Can someone please help me find a alternate way or some way to make apt-get work?
Thanks in advance!
You can't use apt-get to install python packages. In order to install a python package, pip resolves dependencies and build wheels. apt-get doesn't have the functionality to do the same.
You can purge the previous installation of pip:
sudo apt-get remove --purge python-pip
then install a new one:
curl https://bootstrap.pypa.io/get-pip.py | sudo python
finally, try installing boto3:
sudo pip install boto3

How to fix this gRPC installation problem?

Im following these steps to install gRPC on my freshly launched AWS EC2 Instance:
https://jitpaul.blog/2018/04/18/grpc-on-aws/
When I try to execute this line:
sudo yum install libgflags-dev libgtest-dev
I get this error:
I don't want to mess up anything, please help.
Try instead:
sudo yum install gflags-dev
sudo yum install gtest-dev
That should install libgflags-dev and libgtest-dev.

How to access the review board site from other system via browser?

I have set-up all prerequisites and all the installation required for local reviewboard along with rb-site, server is apache httpd with mod_wsi. Can any one help me on how to access the review bpoard which I have installed locally from different systems via web browser.
Below are the steps detailed:
yum -y install zlib zlib-devel
yum -y install openssl-devel
yum -y install memcached
yum -y install python-devel
yum -y install python-setuptools
yum -y install patch
easy_install mysql-python
yum -y install git-core
easy_install ReviewBoard
rb-site install /var/www/ReviewBoard
While Installing rb-site :
Domain name localhost:80
Root Path : reviews
And other configurations are default.
All steps are executed successfully.
But I do not know how can I access the review board over browser.
Please help me?

Error while installing libapache2-mod-wsgi on linux

easy_install libapache2-mod-wsgi
No local packages or download links found for libapache2modwsgi
error: Could not find suitable distribution for Requirement.parse('libapache2mod wsgi')
libapache2-mod-wsgi is not a python package. You should install it via your distribution package manager. For example, if you are in a debian based distribution:
sudo apt-get install libapache2-mod-wsgi
Or if you are working with Python 3
sudo apt-get install libapache2-mod-wsgi-py3