I need to install pyQt in ubuntu 14.04 version. BUt when I use
sudo apt-get install python-qt4
Then, I got some error like:
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/libx/libxslt/libxslt1-dev_1.1.28-2build1_amd64.deb Size mismatch
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Related
I am trying to install Djnago on ubuntu 20.04 LTS.
First of all, I used the following command to install Python:
sudo apt-get install python3
Python version is 3.8.2.
Then I used these commands to install Django,
1st step: sudo apt update
2nd step: sudo apt install python3-pip
Error is showed in 2nd step and that is,
Media change: please insert the disc labeled
'Ubuntu 20.04.1 LTS _Focal Fossa_ - Release amd64 (20200731)'
in the drive '/cdrom/' and press [Enter]
When I press Enter. It continuously showed but it doesn't solve the problem
Now, what should I do? Please, help me solving this problem.
Since Python is already installed on Ubuntu 20.04, you should try:
pip install Django==3.1.1
Here is the documentation about how to install Django on different OS. Django Documentation
sudo apt-get update
python -m pip install Django
This will download the latest version of Django for you.
By using the version name you can get specific version.
But by doing this you will get the latest stable version
When I execute make from the quick start instruction for DPDK, I get the following error:
eal_memory.c:56:18: fatal error: numa.h: No such file or directory
The error comes out even when libnuma is installed already:
>sudo yum install numactl-libs.x86_64
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* elrepo: mirrors.tuna.tsinghua.edu.cn
Package numactl-libs-2.0.9-6.el7_2.x86_64 already installed and latest version
Nothing to do
I'm using CenOS Linux release 7.3.1611 (Core).
How do I fix this problem?
Try to install numactl-devel:
sudo yum install numactl-devel
numa.h is also part of libnuma package.
Please install libnuma package:
CentOS 6.9: yum install libnuma-devel
Ubuntu: apt-get install libnuma-dev
Looks like on CentOS 7 docker container libnuma-devel is not available. In that case try yum install numactl-devel
I am trying to install using
sudo apt-get install babel.messages
but getting error:
ImportError: No module named babel.messages
Please let me know how to install in Ubuntu 16.04
Try that with using this command:
# pip install babel
It will work well
For Ubuntu versions older than 17.04, you can install python-babel from the Ubuntu repositories by running the following command in terminal:
sudo apt-get install python-babel
For Ubuntu versions from 17.04 and also on older versions you can install it via pip, the Python package manager as:
pip install babel
If you don't have pip installed yet, you can install it as:
sudo apt install python-pip
While installing libjpeg on PIL, Python 2.7
sudo apt-get install libjpeg-dev
i'm getting an error:
WARNING: The following packages cannot be authenticated!
libjpeg-turbo8-dev libjpeg8-dev libjpeg-dev
Install these packages without verification [y/N]? y
Err http://archive.ubuntu.com/ubuntu/ raring-updates/main libjpeg-turbo8-dev i386 1.2.1-0ubuntu2.13.04.1
404 Not Found
Err http://security.ubuntu.com/ubuntu/ raring-security/main libjpeg-turbo8-dev i386 1.2.1-0ubuntu2.13.04.1
404 Not Found
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/libj/libjpeg-turbo/libjpeg-turbo8-dev_1.2.1-0ubuntu2.13.04.1_i386.deb 404 Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Update 1:
sudo apt-get update
Err http://archive.ubuntu.com raring-updates/main i386 Packages
404 Not Found [IP: 91.189.88.149 80]
it seems that the ip/address of Ubuntu libs repositories changed,
because the system already after "End Of Life", so you need to manually edit repositories list that used by apt-get.
you can see a hint for it here and here.
in my case, i preferred to upgrade to 14.04. it's a LTS version, so next time I should meet this problem will be after 5 years of usage.
to upgrade yours look this site.
for now (September 2014) I needed to upgrade it twice.
once from 13.04 to 13.10 and next to 14.04.
note: the first step was suggested to do by "sudo update-manager -d", but this doesn't work because of the same repositories problem. so I used "sudo do-release-upgrade"
I've just learned how to use virtualenv and I installed Django 1.4.5. I'm assuming that the virtualenv created a clean slate for me to work on so with the Django 1.4.5 installed, I copied all my previous files into the virtualenv environment.
I tried to run the server but I get an error saying "no module named MySQLdb". I think this means that I forgot to install MySQL-python. I tried to install it via
pip install MySQL-python
But I get this error
Downloading/unpacking MySQL-python
Running setup.py egg_info for package MySQL-python
The required version of distribute (>=0.6.28) is not available,
and can't be installed while this script is running. Please
install a more recent version first, using
'easy_install -U distribute'.
(Currently using distribute 0.6.24 (/home/bradford/Development/Django/django_1.4.5/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg))
Complete output from command python setup.py egg_info:
The required version of distribute (>=0.6.28) is not available,
and can't be installed while this script is running. Please
install a more recent version first, using
'easy_install -U distribute'.
(Currently using distribute 0.6.24 (/home/bradford/Development/Django/django_1.4.5/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg))
----------------------------------------
Command python setup.py egg_info failed with error code 2 in /home/bradford/Development/Django/django_1.4.5/build/MySQL-python
Not quite sure how to go about fixing this problem =/ any help much appreciated!
I recently had exactly this issue (just not in relation to Django). In my case I am developing on Ubuntu 12.04 using the default pip and distribute versions, which are basically a little out of date for MySQL-python.
Because you are working in an isolated virtualenv, you can safely follow the suggested instruction without affecting your Python installation.
So you can...
workon your_virtualenv #activate your virtualenv, you do use virtualenvwrapper, right?
easy_install -U distribute #update distribute on your virtualenv
pip install MySQL-python #install your package
If for some reason upgrading distribute is not an option, you could try installing an older version of MySQL-python as follows (you'd have to check this version is compatible with your version of Django):
pip install MySQL-python==x.y.z #where x.y.z is the version you want
Spent an hour looking through stackoverflow. Evntually found answer in the other question. This is what saved me:
sudo apt-get install libmysqlclient-dev
mysql_config goes with the package.
When doing in a virtualenv :
pip install MySQL-python
I got
EnvironmentError: mysql_config not found
To install mysql_config, as Artem Fedosov said, first install
sudo apt-get install libmysqlclient-dev
then everything works fine in virtualenv
MySQL driver for Python (mysql-python) needs libmysqlclient-dev. You can get it with:
sudo apt-get update
sudo apt-get install libmysqlclient-dev
If python-dev is not installed, you may have to install it too:
sudo apt-get install python-dev
Now you can install MySQL driver:
pip install mysql-python
Here is a more detailed documentation for MySQL in Django:
http://codex.themedelta.com/how-to-install-django-with-mysql-in-a-virtualenv-on-linux/
I had to do this:
pip install mysql-python
inside the virtualenv
The commands are always run in ubuntu:
easy_install -U distribute
later
sudo apt-get install libmysqlclient-dev
and finally
pip install MySQL-python
The suggested solutions didn't work out for me, because I still got compilation errors after running
`$ sudo apt-get install libmysqlclient-dev`
so I had to run
apt-get install python-dev
Then everything worked fine for me with
apt-get install python-dev
Try this:
Version Python 2.7
MySQL-python package, you should use either MySQL_python‑1.2.5‑cp27‑none‑win32.whl or
MySQL_python‑1.2.5‑cp27‑none‑win_amd64.whl depending on whether you have installed 32-bit or 64-bit Python.
pip install MySQL_python‑1.2.5‑cp27‑none‑win32.whl
if you are using mysqlclient package, then use
mysqlclient‑1.4.6‑cp27‑cp27m‑win32.whl or
mysqlclient‑1.4.6‑cp27‑cp27m‑win_amd64.whl
pip install mysqlclient‑1.4.6‑cp27‑cp27m‑win32.whl
https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient