Closed sanderd17 closed 13 years ago
What version of python to do you have? You can find out with python -V
. We recommend using Python >= 2.7. I'm not sure whether installing works with an older version of python.
Normally Arch has the most recent vanilla versions of all packages (it usually takes less than one day before a new release is in the repositories). But we do have to install all packages ourselves (nothing is preinstalled, apart from some basic bash tools).
[sander@arch ~]$ python -V
Python 3.2.2
Heh, I reckon the build tool node.js uses only supports Python 2.x.
Ok, so I should downgrade first.
When will you have support for python 3.x? Is this support planned?
We're basically restricted to use waf/node-waf because node's underlying build system is waf. That means there's not much we can do about that. There are plans in the node project to switch the build system to gyp, but that won't happen before the next stable version 0.6. MapBox is currently built on the stable 0.4.x branch.
Ok, thanks for the help
Here's what I did to install Tilemill on Arch. I could not immediately find how to let the node.js package manager use Python 2, so I worked around it by temporarily changing the python symlink. I would not recommend to downgrade Python to version 2 on Arch, since it might break programs that depend on Python 3.
Tilemill depends on mapnik 2, which is only available as a source package in the Arch User Repository (mapnik-git). It takes quite some time to compile. I use pacaur to install AUR packages, so replace this with your own preferred program, or install it manually.
Note that it is possible you need additional packages, I often compile software from source so I already have a large number of development packages installed on my system.
# Install dependencies.
sudo pacman -S nodejs
pacaur -S mapnik-git
# Download the Tilemill source.
cd /usr/local/src/
git clone https://github.com/mapbox/tilemill.git
# Compile and install Tilemill, working around the python2 requirement.
cd tilemill
sudo rm /usr/bin/python && sudo ln -s python2 /usr/bin/python
npm install
sudo rm /usr/bin/python && sudo ln -s python3 /usr/bin/python
# Replace 'python' with 'python2' in all python sources.
grep -rl --null "#\!/usr/bin/env python" * | xargs -0 perl -pi -e 's|#!/usr/bin/env python$|#!/usr/bin/env python2|g'
grep -rl --null "#\!/usr/bin/python" * | xargs -0 perl -pi -e 's|#!/usr/bin/python$|#!/usr/bin/python2|g'
# Launch Tilemill.
./index.js
I have made PKGBUILD to handle tilemill. It can be found on aur.archlinux.org, where the python hax could be reduced to something like below, and without modifying the system in the process and only work in the package.
mkdir -p $srcdir/bin
ln -s -f /usr/bin/python2 $srcdir/bin/python
export PATH=$srcdir/bin:$PATH
Tilemill depends on mapnik 2, which is only available as a source package in the Arch User Repository (mapnik-git). It takes quite some time to compile. I use pacaur to install AUR packages, so replace this with your own preferred program, or install it manually.
@pfrenssen I know that this is quite an old issue but maybe useful for people stumbling on this way later like me. I can not install mapnik-git
for the life of me, I tried with helpers like pacaur
and aurman
after failing with makepkg but the building always succeeds to make my pc stop responding after 5 or 6 minutes. I looked up some issues on the mapnik repo and there's nothing similar to what I'm going through, it has nothing to do with the compiler I'm using I guess since it doesn't show me any error, it just hangs.
and for @nickoe's solution, I'd love to try it but your PKGBUILD is not available on the AUR at the moment.
Thanks for your contributions everyone, when I find a way to make TIlemill work on Arch I won't fail to post it here
I'm trying to get tilemill compiled on Arch Linux (and meanwhile make a package for it, so other user can install it better), but I'm stuck on the following error message: