I like to use PocketSphinx speech recognition engine. For that, libpulse-dev is one of the dependencies. However, I cannot install libpulse-dev in my system.
I used the following command to install the package:
sudo apt-get install libpulse-dev
And I get the following output:
Building dependency tree
Reading state information... Done
Package libpulse-dev 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 'libpulse-dev' has no installation candidate
What should I do?
Thank you in advance...
Your /etc/apt/sources.list is misconfigured, edit it as follows:
deb http://us.archive.ubuntu.com/ubuntu focal main restricted
deb http://security.ubuntu.com/ubuntu focal-security main restricted
deb http://us.archive.ubuntu.com/ubuntu focal-updates main restricted
Then run:
sudo apt update
sudo apt install libpulse-dev
if anyone are using CentOS 7 try do this:
sudo yum install pulseaudio-libs-devel
sudo yum install alsa-lib-devel -y
sudo yum install portaudio
pip3 install --upgrade pocketsphinx
...or try it:
pip3 install pipwin
pipwin install pyaudio
Related
$ sudo apt-get install python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-pip 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
However the following packages replace it:
python3-pip
both my pip and pip3 are installed in python 3
pip -V
pip 20.1.1 from /usr/lib/python3/dist-packages/pip (python 3.8)
pip3 -V
pip 20.1.1 from /usr/lib/python3/dist-packages/pip (python 3.8)
Now i cant install pip
...it shows above error
If you have python(python2) installed you then you can use following command to install pip(for python2).
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
python get-pip.py
Now you can check for pip2
pip2 --version
I hope these will help you
Just for reference, this problem can occur if you are using Windows Ubuntu Shell and your firewall is blocking your Ubuntu sandbox's traffic. In that case installation resources can not be found and simple apt-update will not work.
In order to test if the firwall causes your problem, you can simply try to ping a website. Also if apt-update will fail with connection refused the firwall is likely your problem. Check this post on how to add your sandbox to the firewall whitelist (Endpoint Protection).
Use these commands first then try again and perform a reinstallation by sudo apt reinstall python3-pip
sudo add-apt-repository universe
sudo add-apt-repository multiverse
sudo apt-get update
I have just created a virtual environment on my machine (I am running on ubuntu 18.04 LTS). I have the python version of 3.6.7 and now I want to install mysqlclient into my virtual environment.
After I do pip install mysqlclient it didn't work, instead it gave me errors saying;
Command "python.py egg_info" failed with error code 1 in /tmp/pip-install-zd21vfb3/mysqlclient/', and that the msql_config file is not found.
My setup tools are all up to date.
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.
In order to correctly install MySQLClient on a fresh Ubuntu 18.04 LTS you need to install each of the following:
# Replace python3.6 with which ever version of Python3 you are using
sudo apt-get install python3.6-dev
sudo apt-get install mysql-client
sudo apt-get install libmysqlclient-dev
sudo apt-get install libssl-dev
The last one is often missed on answers but is required now.
Only then can you install it via pip. Also make sure to update pip so you are not using version 9 if that installs into your vevn.
I was getting the same error when building my docker container. I tried installing the following in sequence but did not work.
sudo apt-get install mysql-client
sudo apt-get install libmysqlclient-dev
sudo apt-get install libssl-dev
Then this 👇 solved the problem.
sudo apt-get install default-libmysqlclient-dev
Check if you have already installed setuptools.
After that
in terminal
sudo apt-get install libmysqlclient-dev
Then(Keeping in mind to activate the virtual enviroment)
sudo pip3 install mysqlclient
Need to install python packages like pip, numpy, cv2 on an Amazon EC2 instance of Ubuntu. I tried using sudo apt-get install python-pip but got below given error:
ubuntu#ip-172-31-35-131:~$ sudo apt-get install python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-pip
Try first sudo apt-get update then
sudo apt-get install python-pip
Have you tried the instructions here?
You can install pip from PyPa directly:
curl -O https://bootstrap.pypa.io/get-pip.py
python get-pip.py --user
Your system may have a concurrent python3.x under the name python3, then you can install pip for it with python3 get-pip.py --user as well. (Or contrarily, python2.x under the name python2.)
I'm tearing what's left of my hair out trying to figure out how to install Kivy on Linux. I'm a newb to pretty much everything, so not incredibly surprising, but I'm trying to make a Makefile that will install the necessary dependencies for my app that I build via Kivy.
This is my Makefile:
#!/bin/sh
all: packages program
packages:
sudo apt-get install python3-kivy
sudo apt-get install python3-pip
sudo apt-get install python-setuptools python-dev build-essential
sudo apt-get install python3-dev
sudo apt-get docutils-doc python3-pygame python-pil-doc python3-pil-dbg ttf-bitstream-vera
sudo easy_install pip
sudo apt-get -f install
pip install --upgrade pip
pip3 install python3-weather-api
sudo pip install requests
pip3 install beautifulsoup4
pip3 install Cython
pip3 install h5py
pip3 install kivy
program:
python3 project.py
This is the output:
sudo apt-get install python3-kivy
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-kivy is already the newest version (1.10.0-0~stable0+201708191146~pkg175~ubuntu16.04.1).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
python3-kivy : Depends: python3-kivy-common (= 1.10.0-0~stable0+201708191146~pkg175~ubuntu16.04.1) but it is not going to be installed
Depends: python3-kivy-bin (= 1.10.0-0~stable0+201708191146~pkg175~ubuntu16.04.1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Makefile:5: recipe for target 'packages' failed
It keeps saying to run apt-get -f install, which I did, but the same error keeps popping up.
I am very new to Ubuntu OS and Python as well. I want to install Django. But i dont have easy_install and I tried below command to install pip
sudo apt-get install python-pip
I got an error as below
Unable to locate package python-pip
I tried below command as well
sudo apt-get install python-pip
and i got error as below
E: Package 'python-setuptools' has no installation candidate
I am very confused in installing django, How to successfully install django
First update repositories
sudo apt-get update
then try
sudo apt-get install python-pip python-dev build-essential python-setuptools
if nothing, you can install pip and setuptools packages manually. Download them from PyPI.
Install pip
To install or upgrade pip, securely download get-pip.py.
Then run the following (which may require administrator access):
sudo python get-pip.py
If setuptools (or distribute) is not already installed, get-pip.py will install setuptools for you.
To upgrade an existing setuptools (or distribute), run pip install -U setuptools
Upgrade pip
On Linux or OS X:
sudo pip install -U pip
Then you can download django using pip,
sudo pip install django
Install
First you need make sure you have Python install, here I take 2.7.6 as example. For how to install Python, you can go check this link:
https://askubuntu.com/questions/443048/python-2-7-6-on-ubuntu-12-04-how-to
Then you can start install Django and setup database as follow:
sudo apt-get install python-django
sudo apt-get install mysql-server
sudo apt-get install python-mysqldb
You can find more configuration detail in this link
http://yuwenqing.org/?p=108
Also, for less pain in future develop, you should deploy your Django application in python virtualEnv, here are some detail of why you need virtualEnv.
http://yuwenqing.org/?p=126