Something that probably shouldn't be causing me so many problems, is.
I'm trying to install PIL on my Ubuntu server. It's installing fine. However every time I try and update the database to add the image field I get the following error:
Error: One or more models did not validate:
product.product: "image": To use ImageFields, you need to install the Python Imaging Library. Get it at http://www.pythonware.com/products/pil/ .
I've just realised I have been logged in as my user. Do i need to be logged in as root to install it? I'm doing this on a VPS not a local machine.
I've tried loads of tutorials on the web and not getting anywhere at all.
I had to install python-dev then install PIL inside my virtualenv.
All working now.
Thanks for your help all! :)
If you are not root, then entering the following command should install python-imaging:
sudo apt-get install python-imaging
Or (if you are root), the following command (without sudo) will install python-imaging
apt-get install python-imaging
You should ideally be using a virtualenv and pip install pil there... If you have access and want to use system wide packages, then you need to elevate to root (sudo) to easy_install or pip install.
Make sure your server (Django?) is rebooted so it can pick up the new libraries. (The interpreter doesn't always seem to pick up newly installed modules while it's running).
Related
I would like to ask a question about the installing speexdsp module in python installed with Anaconda3.
I downloaded the swigwin-3.0.12 from website and add it to my system variable, as well as my python35.lib and the python\include. However, I get the following message:
cl.exe' failed with exit status 2
From my research, it looks like this could be solved by adding it to system variable, but doing that didn't solve the problem for me.
If you are using ubuntu thn use this command.
sudo apt-get install build-essential libspeex-dev libspeexdsp-dev
libpulse-dev
On mac (homebrew)
brew install speex speexdsp
Speexdsp git
Speex official website
Get info from their official website.
I'm trying to get up and running with Python 3.5.2 and various packages on a server I work on, but don't have root privileges for. I installed Python to my home, and that seems to be working. I'm trying to set it up so I can install packages to that Python installation (ie ~/lib/python3.5/site-packages) via pip, but I cannot get it working.
Even after adding ~/lib/python3.5/site-packages to $PYTHONPATH, no luck.
Running pip install pandas, I get the error /usr/local/bin/python3.5: bad interpreter: No such file or directory , so it's still looking in the wrong spot. It should be looking at ~/bin/python3.5. Setting an --install-option="--prefix= argument doesn't change the problem.
Is this possible to do?
Try this:
pip3 install --user "library name"
I've one problem, when I try to install the 'ahkab' packages on Linux, Ubuntu based, for Python with the command pip (pip install ahkab).
You can to see my problem on image below. I don't know what do I need to do to solve this case.
I think you may need to run with super user permission while installing.
Use sudo in-front of you command.
I've just started trying to use Nitrous.io. I've made a box with python, and am trying to use pip to install a python package called praw.
It downloads all of the information fine, but on running the install script, I get an error stating that it could not create a file due to permission restrictions in the /usr directory. Is there any way to get around this as I need the package for my application to work properly.
You could try pip install --user praw
https://pip.pypa.io/en/latest/user_guide.html#user-installs
Someone please tell me I'm not crazy, becuase I really feel like I am right now.
Ok so, I'm trying to setup a webapp with python and django using heroku, but I've hit quite an odd obstacle.
It wants me to setup a virtualenv using the command $ virtualenv venv --distribute, which is all well and good except:
yeh, so naturally I googled how to install virtualenv and I found this:
But, of course:
So I continued my search by trying to find out how to install pip and I found this:
Aaaaaaand that's when I completely lost my marbles because apparently you need to install pip to install virtualenv to install pip. (maybe not, but that's why I'm a noob and I need help).
But then I took another look at the vitualenv installation guide, and found that I could download it and install it manually, so I extracted all the files from the downloaded archive into my python33 folder and used setup.py install. And I got this:
So I changed the line in that file to except ValueError as e and I got another error from a different python file in that same folder so I reverted the change I made and decided that it probably was not a good idea to meddle with those scripts.
Please, any help at all to do with setting up a free server with python and django would be greatly appreciated. Furthermore, I am sorry if my question is stupid, or incorrectly tagged.
You are following install guides for linux. You should try to find an install guide for pip and virtualenv on windows. First install pip systemwide and then use pip to install virtualenv systemwide. Then start using virtual environments.
Start with How to install pip on W$ and Python and virtualenv on W$. An alternative is the Hitchhiker's guide to python.
Edit
As Ron Elliott states in the comments,
you'll need to point your path to C:\Python2x\Scripts or C:\Python3x\Scripts in order to pick
up easy_install and pip as well as any other script executables
installing to that directory.
But then I took another look at the vitualenv installation guide, and
found that I could download it and install it manually, so I extracted
all the files from the downloaded archive into my python33 folder and
used setup.py install.
You downloaded the package and run setup.py install in wrong folder, that's why it didn't work.
You should:
Download the archive virtualenv-1.10.tar.gz to a Downloads folder (or where ever you want)
Extract it, you will have a folder name virtualenv-1.10
Go to (cd) the extracted folder
Run command: python setup.py install
Anyway I would recommend installing setuptools and pip first, then you can install virtualenv from pip: pip install virtualenv.