0

Following this thread: Psycopg2 under osx works on commandline but fails in Aptana studio

I have the exact same issue. I couldnt find/understand how to use 32 bit python in Aptana. Running the same .py file in terminal works fine

Community
  • 1
  • 1
buddy123
  • 5,679
  • 10
  • 47
  • 73

2 Answers2

1

Download the 32 bit version of Python and add it as your interpreter for Python.

There's a detailed guide with pictures on how to do it under Ubuntu, the process for OS X is likely similar: https://askubuntu.com/questions/233740/configure-python-2-7-3-interpreter-in-aptana-studio

EDIT: To find out what version of Python Aptana is using, run

import sys
print(sys.version) #under python 3
print sys.version #under python 2.7

If you're not sure whether you're using Python 3 or 2.7, try both and see which one works.

Community
  • 1
  • 1
Patrick Collins
  • 10,306
  • 5
  • 30
  • 69
1

If you open a terminal, you can check:

$ file /usr/bin/python

and see the available architectures you have. It is likely that the binary supports more than one architecture.

Have you already tried using?

arch -i386 /usr/bin/python

as interpreter in Aptana, or setting the environment variable VERSIONER_PYTHON_PREFER_32_BIT or just forcing the 32 bits version:

$ defaults write com.apple.versioner.python Prefer-32-Bit -bool yes

You can define the environment variable in the Preference window, section Interpreter - PythonEnvironment

gpoo
  • 8,408
  • 3
  • 38
  • 53