Help: PYTHONPATH vs. system PATH


hi,

i'm trying code in python 2.7 on os x snow leopard. when tried libraries opencv , pyqt4, faced many problems. first, system mix between python 2.7 installation , default 1 comes os x.

also, faced problems importing opencv because python wouldn't recognize it. solved problem later pasting code exported variable pythonpath, didn't understand happened.

now, i'm facing similar problems pyqt4 whenever try execute command pyuic4 terminal [it says "command not found"]

tried installing via macports still got same problems. i'm pretty sure because need modify pythonpath and/or system path in .bash_profile, i'm clueless. have no idea because don't understand these things about.

can please me understand how things right?
 

i highly recommend getting book on shell programming , reading first few chapters. learning bash shell newham , rosenblatt decent one. there many others.

path variable controls executables available command line without using absolute paths. if type:
env | grep path
see directories in path.

add pyuic4 command environment, need find command add it's path path environment variable. pyuic4 command in /users/you/local/bin
issue command:
export path=/users/you/local/bin:$path

put @ end of .bash_profile file , subsequent shells see it.

pythonpath variable used python find packages. if know set when got things working, add same line .bash_profile file.
export pythonpath=whatevermadeitwork
 


Forums Macs Mac Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

Comments

Popular posts from this blog

Mac OS X Server as File Server for 50/50 Mac & PC Workgroup

Permissions Problem?

iPhone won't sync with iTunes