Kali Linux (Debian) can't install pip.py [closed] - python

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I am trying to install 'python-pip', on kali linux (debian derived distribution), using the command below:
apt-get install python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-pip
I am getting above error.
Any help?

https://bootstrap.pypa.io/get-pip.py
install this as a 'py' file. Go to Linux terminal type in
root# python get-pip.py
Assuming downloaded file is located in 'root'

u/jelmer is correct, your /etc/apt/sources.list needs two more lines. Open the sources file and add these two lines
deb-src http://http.kali.org/kali kali main non-free contrib
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free
afterwards open your terminal run
apt-get update
Pip should install easily with
apt-get install python-pip

Make sure you have the right entries in /etc/apt/sources.list.
See http://docs.kali.org/general-use/kali-linux-sources-list-repositories for details.

Related

"No module named lxml" on AWS [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I'm trying to run my discordbot.py file on the Amazon EC2 server using MobaXTerm
I've tried every type of installion like:
sudo yum install python-lxml
sudo yum install libxml2-devel libxslt-devel python-devel
sudo yuminstall libxml2-dev libxslt-dev python-dev
pip install lxml
etc.
It always tells me stuff like:
Package python-lxml-3.2.1-4.amzn2.0.2.x86_64 already installed and latest version
Package gcc-7.3.1-12.amzn2.x86_64 already installed and latest version
Package libxml2-devel-2.9.1-6.amzn2.5.1.x86_64 already installed and latest version
Package libxslt-devel-1.1.28-6.amzn2.x86_64 already installed and latest version
Package python-devel-2.7.18-1.amzn2.0.3.x86_64 already installed and latest version
Nothing to do
Yet when I want to run my discord bot, it gives me:
import lxml.html
ModuleNotFoundError: No module named lxml
I don't know what to do from that point on.
Based on the comments.
The solution was to use pip3 install lxml, rather then pip install lxml. The reason is that the former command uses Python 2, not Python 3 required by the bot.

apt-get install unable to locate package on ubuntu 12.04 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I'm trying to install matplotlib on my ubuntu 12.04 system with python3. I've read that this package should be available in the package manager, but when I type
sudo apt-get install python3-matplotlib
I get
E: Unable to locate package python3-matplotlib
I've tried
sudo apt-get update
sudo apt-get upgrade
and I still get the error. I know this is a simple problem, but I can't figure it out.
Because the package does not exist, see:
http://packages.ubuntu.com/search?keywords=matplotlib&searchon=names&suite=precise&section=all
If you need matplotlib + python3 on 12.04 you will probably have to install it from source.
As tcaswell pointed out, it doesn't seem to be included in the official Ubuntu repos. You could try to find an external repo for it, but I think you'll be better off installing the version from PyPI.
pip install matplotlib
Most people prefer to install python dependencies using a tool like pip, which defaults to the PyPI repo for downloads.
You could also install from source but then upgrading can become tricky. On the other hand for most packages PyPI will receive updates well before they work their way down to a distro's repo.

how to install packages o python? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Mac OSX 10.6.8 Python 2.7
Hi guys,
I just recently started programming with Python using the "Think Python" by Allen Downey. In Chapter 4, the first case study, he recommends to install a package called swampy...so basically I´m stuck here. For trouble shooting Downey recommends:
import swampy.TurtleWorld -> doesnt work
pip install swampy -> command not found(Could`t also install pip)
After typing
sudo python setup.py install
I get
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file 'setup.py': [Errno 2] No such file or directory
Then I unzip the package swampy and thought to drag&drop it into the appropriate directory, however my directory ends with System/Library/Frameworks/Python.framework/Versions/2.7/Resources here I have 3 objects "English.Iproj" "inof.plist" and "Python"
Does anybody have some suggestions how to install that package?
THX a lot
you shall do:
sudo easy_install pip
sudo pip install swampy
Go to the directory where setup.py is located.
Enter into console next: sudo python setup.py install
Or use easy_install Or pip.

apt-get install unable to locate package [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
On a virtual machine (OS is Ubuntu 10.10), I'm trying to create Debian package from a Python package using stdeb:
apt-get install python-stdeb
But the terminal says:
E:Unable to locate package python-stdeb
Ubuntu 10.10 ceased being supported April 2012. The repositories are likely not hosted by Canonical anymore.
You can manually download python-stdeb here:
http://packages.debian.org/wheezy/python-stdeb
The link is at the bottom.
Just install it via pip:
pip install python-stdeb
If you do not have pip: apt-get install python-pip

Clean Re-Install of Python on OSX & Linux [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
My various Python upgrades, both Ubuntu and OSX, are so gnarled that I can't escape with virtualenv 'cause virtualenv itself doesn't work. I want to lift off and nuke the site from orbit, it's the only way to be sure.
What is the easiest way to uninstall any upgrades, returning the machines to installed defaults, and proceed forward with 2.7 in a virtual environment?
EDIT: Please to note, I installed 2.7 from source on both systems.
EDIT: I've voted to close -- out of place here, and I've figured out enough to get me through the next thing. Thx to all for reading.
To remove python installed from source:
First try
sudo make uninstall
Last time I checked, Python's source Makefile does not come with an uninstall target, but just in case things have changed, it does not hurt to try this.
Assuming that does not work, install checkinstall:
sudo apt-get install checkinstall # install the checkinstall package
cd /path/to/python/source/
sudo checkinstall -D --fstrans=no make install # make the deb package
This will create a .deb file for all the files installed by make install.
checkinstall will ask a few questions; the default answers should be fine.
You should end up with a deb package called something like Python-2.7.deb
Now you can uninstall python with
sudo dpkg -r Python-2.7 # Change Python2.7 to the name of the deb package.
This method has been known to work, at least for an earlier version of Python.

Categories