Could not find platform independent libraries <prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
You seem to have things turned around. Virtualenv creates a python environment that encapsulates a python install. So you want to do the following:
- Install python
- Create a virtualenv using that version of python (eg. virtualenv --python="path to python in 1" virt)
- Switch to that virtualenv (workon virt)
- Now install Django, etc. inside of the virtualenv virt
Here is the recipe I used to get my environment setup and running.
Are you using homebrew? I've found that's the most reliable way to get stuff on the mac.
Comments
-
Alex Garulli almost 2 years
I'm really new to Python and Django.... What I'm trying to do is:
Install Python 2.7 on Mac OS 10.6.8
Install pip Install Django
Install virtualenvwrapper
Create virtual environment
Install Django-Cms
I think, I'll be is ok from Install virtualenvwrapper to the Django-Cms installation because I have already done it, but in the first steps I got some troubles.
I download
Python 2.z
from python.org the Python 2.7.3 Mac OS X 64-bit/32-bit x86-64/i386 Installer (for Mac OS X 10.6 and later [2]), installed whit the wizard . That create a directory/System/Library/Frameworks/Python.framework/Versions
with inside my2.7
folder.My directory
/System/Library/Python
is emptyI'm sure I've Python installed cos:
python --version Python 2.7.3
but when I try
easy_install pip
it gave me:Could not find platform independent libraries <prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] 'import site' failed; use -v for traceback Traceback (most recent call last): File "/usr/bin/easy_install-2.6", line 7, in <module> from pkg_resources import load_entry_point File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 16, in <module> import sys, os, zipimport, time, re, imp, new ImportError: No module named os**
Now no idea of what does mean ...so if somebody could help out from this and put me on the direction where I can istall my virtualenvwrapper I can take it from there.
I'm Junior a front end developer never touch back end so pls be specific and explain me what I need to do as u speak with a child.