Unable to install the Elastic Beanstalk CLI on Ubuntu - amazon-elastic-beanstalk

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)

Related

High version qemu-mipsel could not find libs automatically

System info
kernel:Linux ubuntu 5.4.0-121-generic #137~18.04.1-Ubuntu SMP Mon Jun 20 07:25:24 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic
Default version of qemu installed by apt will cause system error when using gdb-multiarch to debug mips executable files. So i'm trying to compile the source codes.
I've installed re2c, ninja and some packages, which are the dependency of qemu.
wget https://github.com/skvadrik/re2c/releases/download/3.0/re2c-3.0.tar.xz
tar -xvzf re2c-1.0.1.tar.gz
cd re2c-1.0.1/
./configure
make -j4
sudo make install
cd ..
git clone https://github.com/ninja-build/ninja.git
cd ninja
./configure.py --bootstrap
sudo cp ninja /usr/bin/
ninja --version
cd ..
sudo apt install build-essential zlib1g-dev pkg-config
sudo apt install libglib2.0-dev binutils-dev libboost-all-dev libssl-dev
sudo apt install libpixman-1-dev libfdt-dev libsdl2-dev
Then i'd like to build qemu statically and get executable like qemu-mipsel(which are static linked so i rename the files with -static suffix). But when i was trying to run any mips executable file, i got error below.
$ ./qemu-mipsel-static (mips_file_name)
qemu-mipsel-static: Could not open '/lib/ld.so.1': No such file or directory
I'm sure that the arch and endian is right. And i copied related lib files in /usr/mipsel-linux-gnu/lib to current directory and using option -L to specify the lib file path. I got the same result.
And i tried the version installed by apt, It can run smoothly.
Commands for installing qemu via apt are as followed.
sudo apt-get install qemu
sudo apt-get install qemu-user-static
sudo apt-get install qemu-system
sudo apt-get install uml-utilities
sudo apt-get install bridge-utils
However, as for the higher version of qemu compiled by source code, when i was tring commands below, it can run smoothly.
chroot . ./qemu-mipsel-static (mips file)
I wonder the reason and how to correctly run the file using ./ and chroot two ways. Thanks for your help!

Linux Ubuntu 18.04 - Error loading MySQLdb module. Did you install mysqlclient?

I'm getting the following error message while running my Django REST project with MySQL database in pipenv.
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Did you install mysqlclient?
This seems like a very common problem (please don't mark as duplication), but after trying all the possible solutions I'm still getting the same issue..
A few things I tried:
pip3 install mysqlclient
pip3 install python3.6-dev
pip3 install mysql-client
pip3 install libsqlclient-dev
pip3 install libssl-dev
What could still be the problem?
It's a Linux Ubuntu 18.04 server with Plesk. Python version 3.8.
mysqlclient has a dependency on the mysql client & dev packages being installed. In order to fix this on ubuntu, you have to use apt-get to install a couple of mysql packages.
In your case, it looks like the missing mysql_config might be missing on your system. You can fix that by installing libmysqlclient-dev on ubuntu bionic.
another way
install the follwing packages.
sudo apt-get install python3.8-dev
sudo apt-get install mysql-client
sudo apt-get install libsqlclient-dev
sudo apt-get install libssl-dev
other method
pip install pymysql
Then, edit the init.py file in your project origin dir(the same as settings.py)
add:
import pymysql
pymysql.install_as_MySQLdb()
You should install libmysqlclient-dev: sudo apt-get install libmysqlclient-dev
I had to install this.
sudo apt install libpython3.8-dev
Now it works.

how to install pyaudio module in google cloud shell?

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.

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.

Cannot install Chrome on Ubuntu 16.04

Doenloaded the .deb package of Chrome from Google's site. The installation doesn't work when trying to install from the GUI. What's up with that?
Its very simple to install google chrome on ubuntu . Type the following commands in the terminal
Step 1 : Download the latest Google Chrome .deb package with wget:
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
Step 2 : Install the Google Chrome .deb package
sudo apt install ./google-chrome-stable_current_amd64.deb
Hope this helps!
Google Chrome requires some missing dependencies as can be seen when trying to install from the terminal using dpkg -i. Prior to installing Chrome, run:
sudo apt-get install libindicator7 libappindicator1
After that, Chrome installation works fine.
Update the packages first in Ubuntu by below command.
$ sudo apt-get update
Install Required Dependices for Google Chrome as shown below.
$ sudo apt-get install libnss3-1d libxss1 libgconf2-4 libappindicator1 libindicator7
Download the Google Chrome command using below command.
$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
still during installation if you get some error that some dependency is not installed run the below command and it will install all required dependencies.
$ sudo apt-get -f install
Now let's go ahead and install Google Chrome by below command.
$ sudo dpkg -i google-chrome-stable_current_amd64.deb
And its done....
To open it just run below command command
$ google-chrome
You can download the latest package of chrome here
Install the package by clicking on it, or via the terminal:
sudo dpkg -i google-chrome-stable_current_amd64.deb
If you have issues, you may have to run:
sudo apt-get -f install
sudo dpkg -i google-chrome-stable_current_amd64.deb
Alternatively you can use gdebi to install the .deb packages.
It's a lightweight application that is better at installing .deb packages, and is quicker as well. If there are dependencies, it notifies that as well.
To install it type this in the terminal:
sudo apt install gdebi
Once done you can right click on .deb file and select to open it with Gdeb
I face so many issue to install google chrome on Ubuntu 16.04.
finalyl, I successfully install google chrome on ubuntu by following commands:
Step 1: $sudo apt-get install gdebi
Step 2: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
Step 3: In same directory where you have download package or give path in command
$sudo gdebi google-chrome-stable_current_amd64.deb
installed chrome successfully.
I had same issue. on running google-chrome from terminal, found that it need new version of NSS. Chrome 62 need NSS>=3.26. So installed libnss3.
$google-chrome
[6999:7036:1113/200616.549496:FATAL:nss_util.cc(632)] NSS_VersionCheck("3.26") failed. NSS >= 3.26 is required. Please upgrade to the latest NSS, and if you still get this error, contact your distribution maintainer.
Aborted (core dumped)
sudo apt-get install --reinstall libnss3
and it worked for me :)