Monday, 15 August 2011

Picking which Python XCode runs scripts on -


I have a xcode project that runs some dragon scripts during the creation process. They use some dragon packages (beautiful soup and slim). I'm setting up a project on a new computer, and I'm using a homebrew to install Python, and then using PIP to install two packages.

Unfortunately, I get an error when installing the project

  Traceback (most recent call final): File "/ User / SuperSaoth / Code / Project Name / Tool / mergehmtmpc ", line 7, & lt; Module & gt; Import slim import: There is no module called slim  

For a while, it was confusing because I know that it is thin during my research, I realized that on my computer two of the dragon Version is

  Io: ~ supersloth $ / usr / local / bin / python -v Python 2.7.9 Io: ~ supersloth $ / Usr / bin / python -v Python 2.7.6 Io: ~ / Supersloth $ that dragon / usr / local / bin / python Io: ~ supersloth $ ebb $ PATH / usr / local / bin: / usr / bin: / bin: /  

default python (/ usr / Local) ex> ['Beautiful soup 4 = 4 .3.2 ',' PIP == 6.0.8 ',' Plei == 3.4 ',' Setup Olouns == 14.3 ',' SlimIT == 0.8.1 ']

and another installation In either (there is no PEP to get the list of packages, no slips in trying to import by hand)

  & gt; & Gt; & Gt; Import slimmeth tracebacks (most recent call final): File "& lt; stdin>", line 1, & lt; Module & gt; Import Irrar: No module named slim & gt; & Gt; & Gt; Import Trans Tracebacks (Last Call Last): File "& lt; stdin>", Line 1, & lt; Module & gt; Import error: no modules named PAP & gt; & Gt; & Gt;  

This leads me to believe that xcode is trying to use Python 2.7.6 without the package, trying as default for xcode during construction.

a

the way it is compelled Will be done

#! . Path_to_desired_version

As the first line of each dragon file

In addition, if you face something like this again,

 < Code> Joe - a python  

will show the options that you have. Without 'A', you will see which is the first in your path.


No comments:

Post a Comment