I am following the instructions on the following page, and I am not sure which setup.py file it is referring to where I need to change JPEG_ROOT = libinclude(“/usr/local”) (I am a beginner). Mac OS X, Python 2.7.
Here is the link, and below is an abstract:
Next get PIL and untar it
http://effbot.org/downloads/Imaging-1.1.6.tar.gz tar -zxvf
Imaging-1.1.6.tar.gz cd Imaging-1.1.6
If you already have PIL I would recommend running
sudo rm -Rf build
to clean any existing builds, this has caused me loads of errors and
gray hairs!
in your setup.py file run find JPEG_ROOT
amend it so it looks as follows
JPEG_ROOT = libinclude(“/usr/local”)
Next move onto the build
sudo python setup.py build
Any help much appreciated.
When you untar the archive, at the root of Imaging-1.1.6, is setup.py.
It's referring to the setup.py in the root of the extracted files.
Related
I install pygame for python3.x in my fedora system, and when I run "python3 setup.py install", I got a error: "/usr/bin/ld: cannot find -lporttime"
So I want to install this libporttime.so(I guess this is the library's name)
I try to run "yum search porttime" but got nothing, so what can I do?
The solution is that you link your libportmidi.so to libporttime.so, that is it.
like: ln -s libportmidi.so libporttime.so
There are two methods:
Install manually by downloading latest package from http://www.time4popcorn.eu/.
Install automatically using rpm package.
But First:
Irrespective of which method you use. You are likely to get the following error regarding libudev.so.0:
$ ./Popcorn-Time: error while loading shared libraries: libudev.so.0: cannot open shared object file: No such file or directory
There is a workaround to fix this error. Create a symlink between libgudev-1.0.so.0 and libudev.so.0. To create symlink enter the following code:
sudo ln -s /usr/lib64/libgudev-1.0.so.0 /usr/lib64/libudev.so.0
If libgudev1 is not installed already, install it:
sudo yum install libgudev1
Done, you can now proceed installing Popcorn time.
Install manually
Download package for Linux from http://www.time4popcorn.eu/.
Open terminal. Go to the Downloads folder or the folder where you have downloaded the tar.gz package:
cd Downloads
Extract Popcorn-Time-linux64.tar.gz using the following command:
tar -zxvf Popcorn-Time-linux64.tar.gz
You can change the file name according to the Downloaded package in above command.
The package I downloaded did not have icon. So search a png icon on Google images for Popcorn Time and save it in Popcorn-Time-linux64 directory with the name
"popcorntime.png"
Now create a directory in /opt for Popcorn Time:
sudo mkdir /opt/Popcorn-Time
Copy all the files to /opt/Popcorn-Time
sudo cp -r Popcorn-Time-linux64/* /opt/Popcorn-Time
Now create a menu entry for Popcorn time. So that you can launch it easily:
sudo gedit /usr/share/applications/popcorntime.desktop
Insert the following lines in the text editor (gedit).
[Desktop Entry]
Name=Popcorn Time
Comment=Stream movies from torrents. Skip the downloads. Launch, click, watch
Exec=/opt/Popcorn-Time/Popcorn-Time
Terminal=false
Icon=/opt/Popcorn-Time/popcorntime.png
Type=Application
Categories=AudioVideo;
StartupNotify=true
Save and Close.
Finished
Install automatically
Download the rpm package from here.
If not found Google “rpm package for Popcorn-Time”.
Double Click the downloaded package.
Click on Install.
Enter password.
Done
Or Install using commands:
cd Downloads
sudo rpm -ivh popcorntime-0.3.3-1.fc20.x86_64.rpm
Check This.
or
Read Book."TS7680 Deduplication ProtecTIER Gateway for System z" Page 155
I am trying to export a GeoTiff with Blender using the Blender Python API (based on Python 3), so I've decided to install GDAL on Ubuntu (14.04). What I would like is to get the module as a standalone folder that I could put in the modules directory of Blender (/home/user/.config/blender/2.73/scripts/modules).
The thing is I've run through several different problems trying to install GDAL. I've tried to install from source (for GDAL 2.0.0) here : Official PyPi Gdal
I ran sudo apt-get install libgdal-dev gdal-bin (I list it here because it may be important)
When I am in the extracted GDAL folder, using python setup.py build & python setup.py install, the library installs to /usr/local/lib/python2.7/dist-packages/osgeo. However, when I run python from command line, running from osgeo import osr returns ImportError: No module named _gdal
Following GDAL via pip , I used pip (pip install GDAL) to install the library, and the folder it went to was /usr/lib/python3/dist-packages/osgeo (using pip show ...). Again, running python3 and trying to import results in the same error. Of course, when I copy-paste each folder in the blender module directory, I get the same error in the Blender Python console.
So I decided to compile the sources using ./configure --with-python & make & make install in the source folder. I then copied the folder GDAL-x.x.x/build/lib.linux-x86_64-3.4/osgeo to the blender modules directory and got this time the error when importing : ImportError: /home/yvesu/.config/blender/2.73/scripts/modules/osgeo/_gdal.so: undefined symbol: _Py_ZeroStruct.
Trying to compile with python3 using python3 setup.py build returns the error error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
EDIT 1:
I think I've found the solution : I went to the directory swig/python (not found in a GDAL-1.11.0 folder but gdal-1.11.0 fodler, can't remember where I downloaded it from), ran python3 setup.py build & python3 setup.py install and could finally find the folder in /usr/local/lib/python3.4/dist-packages/GDAL-1.11.0-py3.4-linux-x86_64.egg/osgeo. When I put this osgeo folder oni the Blender modules directory, I was able to import osgeo in Blender. I will report if anything went wrong.
I think I've listed all my attempts at installing GDAL on Ubuntu. Can anyone point me in the right direction? Do you think it is even possible to install it as a standalone module, or do I need linked libraries through LD_LIBRARY_PATH?
Here is the solution I've found :
Download Gdal sources (v2.0.0 is the current stable release) from ftp://ftp.remotesensing.org/gdal/2.0.0/ or http://download.osgeo.org/gdal/2.0.0/ and untar
Go to the directory gdal2.0.0/swig/python
Run python3 setup.py build & python3 setup.py install
Finally find the module folder in, on Ubuntu : /usr/local/lib/python3.4/dist-packages/GDAL-2.0.0-py3.4-linux-x86_64.egg/osgeo
I can now use it in Blender (copying in the modules directory)
using python3.3 on OS X 10.7.5
when i run
virtualenv-3.3 virtualenv/
it errors on
FileNotFoundError: [Errno 2] No such file or directory: '.../virtualenv/bin/easy_install'
after
Overwriting virtualenv/lib/python3.3/site.py with new content
Overwriting virtualenv/lib/python3.3/orig-prefix.txt with new content
Overwriting virtualenv/lib/python3.3/no-global-site-packages.txt with new content
New python executable in virtualenv/bin/python3.3
Not overwriting existing python script virtualenv/bin/python (you must use virtualenv/bin/python3.3)
Overwriting virtualenv/lib/python3.3/distutils/__init__.py with new content
File virtualenv/lib/python3.3/distutils/distutils.cfg exists with different content; not overwriting
Installing distribute...done.
Installing pip...
my system has setuptools / distribute.
why isn't virtualenv setting up easy_install?
This issue is related to having an outdated version of Pip, I think.
I got a similar error on CEntOS 6.3.
I suggest at least attempting to bootstrap a virtual environment. If it doesn't work, all you have to lose are some megabytes and a 20 minutes of your time.
What you will need:
Compiled Python3.4
Source of the latest VirtualEnv
Fortitude
Pen and paper
Something similar to the answer outlined here might work: What's the proper way to install pip, virtualenv, and distribute for Python?
In short, download the virtualenv package from source from PyPI, extract it, and cd into the directory created by the extraction.
From the documentation:
$ curl -O https://pypi.python.org/packages/source/v/virtualenv/virtualenv-X.X.tar.gz
$ tar xvfz virtualenv-X.X.tar.gz
$ cd virtualenv-X.X
Replace the X.X above with the version number. For example, cd virtualenv-X.X would, after replacing the Xs with the right version number, be cd virtualenv-13.1.2.
Then, use virtualenv.py from there, not just $ virtualenv, but $ ./virtualenv.py.
I hope that this would work much better, since pip with the latest virtualenv will include easy_install in the expected location.
I have tested this on a CEntOS 6.3 machine with a similar configuration. It works on there, but I cannot afford a copy of OS X 10.7.5.
I tried to find a question that would answer to this question but wasn't succesful, so I made a new question.
I'm trying to compile my old Python Tic Tac Toe game in NetBeans, but I get the error message
ImportError: No module named setuptools
In my actual code I haven't imported a module named setuptools. As much as I understand the compiler generates a setup.py file and tries to use that setuptools module in there. How can I fix that problem?
I'm pretty sure that the problem isn't in the code as that same code worked perfectly the time when I actually made it and I haven't changed it after that.
You need to install either setuptools or Distribute in your Python instance. Follow the directions at either web page.
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
tar zxvf setuptools-0.6c11.tar.gz
cd setuptools-0.6c11
python setup.py build
python setup.py install
Same answer as Satya, but easier to copy&paste:
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
tar zxvf setuptools-0.6c11.tar.gz
cd setuptools-0.6c11
python setup.py build
sudo python setup.py install
Same answer as above, but since I dont have comment rights here is the working version which ignores the certificate mismatch for ssl auto-redirect :
wget --no-check-certificate http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
tar zxvf setuptools-0.6c11.tar.gz
cd setuptools-0.6c11
python setup.py build
sudo python setup.py install
I am having some trouble getting Django & PIL work properly since upgrading to Snow Leopard.
I have installed freetype, libjpeg and then PIL, which tells me:
--- TKINTER support ok
--- JPEG support ok
--- ZLIB (PNG/ZIP) support ok
--- FREETYPE2 support ok
but when I try to upload a jpeg through the django admin interface I get:
Upload a valid image. The file you
uploaded was either not an image or a
corrupted image.
It works fine with PNG files.
Any Ideas?
Cato
I had the same experience with Leopard 10.5.x
Here is what I did to fix it, (may not work for you).
Go to your PIL working folder (where you unzipped PIL)
cd to your build folder
cd to your lib.macosx-10.* folder (specific to your os)
remove *.so
cd back to your PIL build folder
(I logged in as su for this, but you can sudo these if you like)
python setup.py clean
python setup.py build
python setup.py install
This rebuilds PIL clean. The reason your jpeg reports ok, is that it just looks for the existence of the jpeg lib files, but not the dependency that happens from a clean build and install of PIL.
Hope this solves your problem, mine was more likely related to the order of installation but maybe it will help...
Ken
As a follow up to Ken's response, I had the same problem with Snow Leopard 10.6.x which was caused by installing PIL before libjpeg. After installing libjpeg, I reinstalled PIL by doing the following.
cd to PIL working folder
python setup.py clean
python setup.py build_ext -i <-- This rebuilds PIL
python selftest.py - Run the selftest to confirm PIL is installed ok
python setup.py install
I ran into a similar issue while on Ubuntu 8.04. I was able to get myself out of it by simply re-issuing my PIL install (via pip):
pip install PIL --upgrade
Not sure what the issue was but I suspect it's similar to what others here reported.