0

Recently I installed Mac OS Yosemite. Until then I had no problem in installing libraries and have already installed beautiful soup, pydelicious, etc. After the installation of Yosemite, I tried to install Mechanize and Requests Libraries in mac. There was no problem in their installation. I could import them and use them from the Terminal. However, Xcode 6.1 doesn't load them/seeing them. I consistently get the

ImportError: No module named mechanize

ImportError: No module named requests error messages.

I have already tried changing the file permissions with full access to the user but to no avail. I also checked PYTHONPATH and .profile files, so far no luck.

I wonder, if any has encountered this problem or if any one know of some fix to this problem?

Community
  • 1
  • 1
Sakthi K
  • 169
  • 2
  • 15
  • What do you mean by Xcode not seeing them? Why would it use them anyway given its only python-enabled element is `lldb`? – Droppy Dec 18 '14 at 13:55
  • I've given the error messages. When I use import in my XCode, the module fails to load. Please see the error message given. This apparently is happening only after I switched to Yosemite. – Sakthi K Dec 19 '14 at 00:25
  • To be clear; you are using xcode to develop in Python? – Droppy Dec 19 '14 at 06:13
  • Yes...The instructions are available in the internet. – Sakthi K Dec 19 '14 at 12:01
  • Well there are couple of things potentially wrong; firstly Xcode might be using the system version of python and any user-added modules might be for a different version (i.e. macports/homebrew) and secondly your particular issue seems to relate to getting an OSX app to pick-up environment variable changes. See [this question](http://stackoverflow.com/questions/12165385/how-to-set-environment-variables-to-an-application-on-osx-mountain-lion) for how to do that. – Droppy Dec 19 '14 at 13:44

1 Answers1

0

Apparently Xcode was referring to my default of Python. After the comment from Droppy, I checked my python version by using

which python

I copy pasted the result in the Xcode Program scheme. Now it works...!

Thanks for all the help.

Sakthi K
  • 169
  • 2
  • 15