Maciej, Armin, A combined response... On Wed, 2012-02-08 at 19:51 +0200, Maciej Fijalkowski wrote:
PyPy does not automatically pick up python packages installed for the system python. The same would actually be true for CPython if you installed it from sources. I suggest using virtualenv and creating one with pypy as an executable and then installing stuff using pip or easy_install.
On Wed, 2012-02-08 at 18:57 +0100, Armin Rigo wrote: Hi Russel,
On Wed, Feb 8, 2012 at 18:40, Russel Winder <russel@russel.org.uk>
wrote:
ImportError: No module named SCons
You need to install SCons for this PyPy. That's just the same as installing it manually for the particular version of CPython you're testing: you get its sources and run "pypy setup.py install". The difference is that SCons is also available as a package in your Linux distribution; this package is for CPython 2.7 --- a particular version of CPython. The Debian package of SCons would not work with a different version of CPython, nor with PyPy.
I understand the points being made above, and I really appreciate the speedy replies, thanks to you both. However, due to my bad explanation I suspect, I think we may be at cross purposes. I do indeed have the Debian SCons package installed, but as far as I know I am not actually making use of any of it -- but this is more an hypothesis than any actual fact. If I was installing SCons then clearly it would need installing separately for CPython and PyPy as each Python installation maintains its own package set (*). However I am running SCons directly from a Mercurial repository, using the boostrap.py code which manipulates paths and spawns a subprocess to ensure the subprocess has the right "environment". What I should perhaps have said more explicitly is that my problem is that python executes this script and everything works whereas pypy doesn't execute the script in the same way. The script in question is: https://bitbucket.org/scons/scons/src/cdc0f05249c6/bootstrap.py I don't immediately see why PyPy would behave different executing this script that the CPython 2.7.2 that works fine. I am increasingly of the view that I am looking but not seeing... (*) Though I do like the Debian solution of depositing things in a shared location and then appearing to install them for each installed Python. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder@ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel@russel.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder