Why I can't install pillow with pip [closed] - python

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I created a ImageField in model.py file and when I tried to run Python gave me an error. It says I have to install pillow . So I typed pip install pillow command.
Then it started installing and after some time (though I thought it was successfully installed) it gave another error and said that it was not successfully installed. It gave me bunch of red colored text that I didn't understand.

I hope it works.
pip install pillow
To check the version or whether it is installed type the following command.
import PIL
print('PIL',PIL.__version__)
Output (for my machine)
PIL 6.2.0
You can also install Pillow along with pip by the following command.
python3 -m pip install --upgrade Pillow
I hope it would be helpful.

Related

Ansible is not installing via PIP [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 was following the tutorial on Ansible docs but was unable to finish it:
$ python -m pip install --user ansible
Returns an error:
/usr/bin/python: No module named pip
While another guide installed it by using python-pip3 and then after running pip3 install --user ansible it was ready to go.
It finishes installation successfully, yet ansible is still not available:
-bash: /usr/bin/ansible: No such file or directory
I have never worked with Python or PIP in the past and I don't understand what could go wrong in the process to start debugging.
You should check your python version in the terminal with
$ which python
command and then this returns a path that contains python(probably this will return a path because almost all of Linux distro contains python). After that result, you could type
$ curl https://bootstrap.pypa.io/get-pip.py
in the terminal, and then type
$ python get-pip.py
pip will be installed after these commands.
I have not found a solution to this but instead I went with the CentOS Epel repository also described in the Ansible docs and it works this way.
sudo yum install epel-release
sudo yum install ansible
Edit: Ok, so all I had to do is to add the following to .bashrc file.
export PATH="$HOME/.local/bin:$PATH"
Fixed.

"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.

Give sudo permission to all simple pip installed packages [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 4 years ago.
Improve this question
On my ubuntu server, some of the installed python packages are simple pip install some are sudo pip install. Is there any way I can give sudo permission to simple pip install?
Note: There is around 250+ package. Installing one by one is quite hectic.
Please help.
Create requirements.txt file through cmd: pip freeze > requirements.txt
it'll list all the python installed packages in you're system to that file. once you got the all packages install using either sudo or normal pip.
with sudo: sudo pip install -r requirements.txt
with out sudo : pip install -r requirements.txt
i hope this will help you.

How to install Py-Moneyed? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I'm trying to add MoneyField to my Django App using Django-Money.
According to the requirements, I need to install py-moneyed v0.4 or later.
I checked py-moneyed but it doesn't mention how to install py-moneyed?
Can someone help me to install py-moneyed and Django-Money on my environment ?
Is there a pip or easy_install package that will do this?
Try running:
pip install py-moneyed
or
easy_install py-moneyed
If pip and easy_install do not work, download the source for py-moneyed from their GitHub by clicking on the 'Download Zip' button on the right side of the website.
Once you have downloaded the source, run setup.py inside the folder with this command:
python setup.py install
This will install the module. For more information see Python's Docs on Installing Python Modules.

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.

Categories