Not able to install setuptools on linux mint - python

I used this command in terminal
sudo apt-get install python-setuptools
it throws up an error instead of installing -
Package 'python-setuptools' has no installation candidate

THis is a python package so you could use pip to install it
pip3 install setuptools

Try this:
sudo apt-get install python-pip
When pip is installed type in:
pip install setuptools
Hope this helps!

Related

What is error for when install psycopg2==2.7.*?

pip3 install psycop2==2.7.*
I try to install Django project on a live server but when I install the package I am getting error! pip install psycopg2==2.7.*
You have to install "headers" for C extension. In this case you should install libpq-dev
sudo apt install libpq-dev

Ubuntu Command 'pip' not found, but there are 18 similar ones (pandas) reintalling works uslly

I tried reinstalling it ,but for us to install pythin packages use the pip's version to specify instaltion for ex pip3 install pandas.
Try to install pip with the following command:
sudo apt-get install python3-pip
Or:
sudo apt-get install python3-dev

Cannot import installed python package

I'm trying to install python-numpy package on my ubuntu 14.04 machine. I ran sudo apt-get install python-numpy command to install it and it says the package has been installed but when i try to access it, i'm unable to do so.
When you type:
sudo pip install package-name
It will default install python2 version of package-name some packages might be supported in both python3 and python3 some might work might not
I would suggest
sudo apt-get install python3-pip
sudo pip3 install MODULENAME
or can even try this
sudo apt-get install curl
curl https://bootstrap.pypa.io/get-pip.py | sudo python3
sudo pip3 install MODULENAME
Many python packages require also the dev package, so install it too:
sudo apt-get install python3-dev
Also check for the sys.path [ make sure module is in the python path ]

ImportError: No module named pkg_resources on installing matplotlib

This is on CentOs 6.6. I am trying to set up a scientific python environment. I want to avoid Anaconda. When trying to install matplotlib, I get "ImportError: No module named pkg_resources". Full install history:
sudo yum install gcc-c++.x86_64
sudo yum install gcc
sudo yum install atlas atlas-devel lapack-devel blas-devel
sudo yum install python-devel
sudo pip install numpy
sudo pip install scipy
sudo pip install pandas
sudo pip install matplotlib
At the last step, I get the message
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'.
Then I do
sudo pip install --upgrade distribute
which installs distribute-0.7.3, setuptools-18.0.1. Then:
sudo pip install matplotlib
which results in:
File "/usr/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
ImportError: No module named pkg_resources
Any ideas?
Update
After the above steps, setuptools and pip are broken in this installation. From a python shell, doing help() followed by modules does not list setuptools. A search in the filesystem for setuptools directories reveals:
/usr/lib/python2.6/site-packages/setuptools-18.0.1.dist-info/
while the setuptools.pth file in /usr/lib/python2.6/site-packages/ contains a pointer to the non-existent ./setuptools-0.6c11-py2.6.egg-info.
At the same time, there is a directory
/usr/share/doc/python-setuptools-0.6.10/
After all this, pip no longer works.
#pavan they said CentOS, so apt is unlikely to help them.
They could, though, do :
yum remove python-setuptools
yum install python-setuptools
(my also need to reinstall pip: yum install python-pip )
And that might fix the problem.
Try this for OS supporting apt-get (Ubuntu etc)
sudo apt-get install python-pkg-resources python-setuptools --reinstall
Try install python-pip (and dependencies):
yum install python-pip
This solved my problem (Centos release 6.8).

How can I install python-iso8601_0.1.4-2_all.deb on Ubuntu 10.04 (lucid)

I am using Ubuntu 10.04, which supports Python up to version 2.6.5.
However, I need to install the package python-iso8601_0.1.4-2_all.deb,
which depends on python (>= 2.6.6-7~).
I can not upgrade the distro, since I am using some other packages
which are not supported in 10.10+
Thank you!
/Nico.
Thats likely to break far too many things. You are better of installing the ISO 8601 package as an egg from http://pypi.python.org/pypi/iso8601/ for example.
Install pip:
sudo apt-get install python-pip python-dev build-essential
sudo pip install --upgrade pip
sudo pip install --upgrade virtualenv
and then install your package:
sudo pip install iso8601

Categories