As I said I'm getting error while installing Open cv on Raspberry pi3 I'm following instruction from pyimagesearch. I get error as follow
pi#raspberrypi:~ $ sudo python get-pip.py
Collecting pip
Downloading pip-9.0.3-py2.py3-none-any.whl (1.4MB)
100% |████████████████████████████████| 1.4MB 72kB/s
Installing collected packages: pip
Found existing installation: pip 9.0.1
Uninstalling pip-9.0.1:
Successfully uninstalled pip-9.0.1
Successfully installed pip-9.0.3
pi#raspberrypi:~ $ sudo python3 get-pip.py
Collecting pip
Using cached pip-9.0.3-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 9.0.1
Uninstalling pip-9.0.1:
Successfully uninstalled pip-9.0.1
Successfully installed pip-9.0.3
pi#raspberrypi:~ $ sudo pip install virtualenv virtualenvwrapper
Collecting virtualenv
Downloading virtualenv-15.2.0-py2.py3-none-any.whl (2.6MB)
100% |████████████████████████████████| 2.6MB 47kB/s
Collecting virtualenvwrapper
Downloading virtualenvwrapper-4.8.2-py2.py3-none-any.whl
Collecting stevedore (from virtualenvwrapper)
Downloading stevedore-1.28.0-py2.py3-none-any.whl
Collecting virtualenv-clone (from virtualenvwrapper)
Downloading virtualenv_clone-0.3.0-py2.py3-none-any.whl
Collecting pbr!=2.1.0,>=2.0.0 (from stevedore->virtualenvwrapper)
Downloading pbr-4.0.2-py2.py3-none-any.whl (98kB)
100% |████████████████████████████████| 102kB 278kB/s
Requirement already satisfied: six>=1.10.0 in /usr/lib/python3/dist-packages (from stevedore->virtualenvwrapper)
Installing collected packages: virtualenv, pbr, stevedore, virtualenv-clone, virtualenvwrapper
Successfully installed pbr-4.0.2 stevedore-1.28.0 virtualenv-15.2.0 virtualenv-clone-0.3.0 virtualenvwrapper-4.8.2
pi#raspberrypi:~ $ sudo rm -rf ~/.cache/pip
pi#raspberrypi:~ $ export WORKON_HOME=$HOME/.virtualenvs
pi#raspberrypi:~ $ source /usr/local/bin/virtualenvwrapper.sh
/usr/bin/python: No module named virtualenvwrapper
virtualenvwrapper.sh: There was a problem running the initialization hooks.
If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenvwrapper has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is
set properly.
pi#raspberrypi:~ $ echo -e "\n# virtualenv and virtualenvwrapper" >> ~/.profile
pi#raspberrypi:~ $ echo "export WORKON_HOME=$HOME/.virtualenvs" >> ~/.profile
pi#raspberrypi:~ $ echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.profile
pi#raspberrypi:~ $ source ~/.profile
/usr/bin/python: No module named virtualenvwrapper
virtualenvwrapper.sh: There was a problem running the initialization hooks.
If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenvwrapper has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is
set properly.
pi#raspberrypi:~ $ mkvirtualenv cv -p python2
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/pi/.virtualenvs/cv/bin/python2
Also creating executable in /home/pi/.virtualenvs/cv/bin/python
Installing setuptools, pip, wheel...done.
/usr/bin/python: No module named virtualenvwrapper
pi#raspberrypi:~ $ mkvirtualenv cv -p python3
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/pi/.virtualenvs/cv/bin/python3
Not overwriting existing python script /home/pi/.virtualenvs/cv/bin/python (you must use /home/pi/.virtualenvs/cv/bin/python3)
Installing setuptools, pip, wheel...done.
/usr/bin/python: No module named virtualenvwrapper
pi#raspberrypi:~ $ source ~/.profile
/usr/bin/python: No module named virtualenvwrapper
virtualenvwrapper.sh: There was a problem running the initialization hooks.
If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenvwrapper has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is
set properly.
I get error as virtualenvwrapper.sh: There was a problem running the initialization hooks. How can I fix this error? I can't figure out why am I getting this error. I searched google It didn't fix my issue.I keep getting bash: /usr/local/bin/python3: No such file or directory
virtualenvwrapper.sh: There was a problem running the initialization hooks.
If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenvwrapper has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3 and that PATH is
set properly.
How can I fix this ? I tried to uninstall and reinstalling virtualenv it didn't workout.Do I need to reinstall software and begin from the start? Which takes a lot of time especially in raspberrypi I don't want to do this, help me to fix this problem
Related
I can successfully run a python script from the IDE (PyCharm) but when I attempt to run this from the command line I get ModuleNotFoundError.
The module is PythonGit and is imported as follows after doing pip install:
from git import Repo
if __name__ == '__main__':
print('Imported git package')
I have a virtual environment set up as .venv/ and the package is present here: .venv/lib/python3.10/site-packages/git.
The output of pip list is as follows:
Package Version
------------------ -------
...
gitdb 4.0.9
GitPython 3.1.29
...
The virtual environment is activated when I attempt to run from the command line yet this is the error I am getting:
File "/Users/paul/Repos/dependencies/main.py", line 1, in <module>
from git import Repo
ModuleNotFoundError: No module named 'git'
There are no special settings in the run configuration in the IDE, the script path points to the same file (main.py) and the interpreter to the one in the virtual environment.
I have not been able to find any answer on these forums that successfully addresses this issue yet.
Try to install using setup.py from this https://github.com/gitpython-developers/GitPython
Just clone from git and run setup.py in ur directory
I just tested and successfully ran the python program.
Here are the steps I took:
Open a command prompt
Navigate to the folder that will host the virtual environment. In my case this was:
D:\Personal\Programming>_
Checked Python version using: py --version
D:\Personal\Programming>py --version
Python 3.10.8
Upgraded pip using: py -m pip install --upgrade pip
Checked pip version using: py -m pip --version
D:\Personal\Programming>py -m pip --version
pip 22.3.1 from ...\AppData\Local\Programs\Python\Python310\lib\site-packages\pip (python 3.10)
Ensured I had the latest virtualenv : py -m pip install --user virtualenv
Create a new virtual environment (env) using : py -m venv env
Activated the environment (env) using: .\env\Scripts\activate
The cursor now shows you are in the virtual enviroment:
(env) D:\Personal\Programming>_
Also you should see a new folder called env in the D:\Personal\Programming folder (or where ever you created the virtual environment.
Checked that python existed within the virtual environment: where python
(env) D:\Personal\Programming>where python
D:\Personal\Programming\env\Scripts\python.exe
Installed GitPython using: py -m pip install GitPython
(env) D:\Personal\Programming>py -m pip install GitPython
Collecting GitPython
Using cached GitPython-3.1.29-py3-none-any.whl (182 kB)
Collecting gitdb<5,>=4.0.1
Downloading gitdb-4.0.10-py3-none-any.whl (62 kB)
---------------------------------------- 62.7/62.7 kB 3.5 MB/s eta 0:00:00
Collecting smmap<6,>=3.0.1
Using cached smmap-5.0.0-py3-none-any.whl (24 kB)
Installing collected packages: smmap, gitdb, GitPython
Successfully installed GitPython-3.1.29 gitdb-4.0.10 smmap-5.0.0
Checked pip list using: pip list
(env) D:\Personal\Programming>pip list
Package Version
---------- -------
gitdb 4.0.10
GitPython 3.1.29
pip 22.2.2
setuptools 63.2.0
smmap 5.0.0
Created the main.py program in my D:\Personal\Programming folder
Ran the main.py program: py main.py
(env) D:\Personal\Programming>py main.py
Imported git package
This shows that the program ran successfully.
I need to update offline a library in Python.
I have downloaded the library with pip download and then I try to update the library with the command:
pip install --no-index --user --find-links /tmp/pip/ --upgrade Werkzeug==0.15.5
which gives:
Ignoring indexes: https://...
Collecting Werkzeug==0.15.5
Installing collected packages: Werkzeug
Successfully installed Werkzeug-0.11.15
and then the library stays in the same version!
pip freeze | grep Wer
Werkzeug==0.11.15
Any ideas why this happens?
UPDATE: After the comment from #hoefling I rerun with the -vvv option and this is what I got:
pip install --no-index --user --find-links /tmp/pip2/ -vvv Werkzeug==0.15.5
Ignoring indexes: https://pypi:pypi#..../simple/
Collecting Werkzeug==0.15.5
0 location(s) to search for versions of Werkzeug:
Skipping link /tmp/pip2/werk/ (from -f); not a file
Found link file:///tmp/pip2/werk/Werkzeug-0.15.5-py2.py3-none-any.whl, version:
0.15.5
Local files found: /tmp/pip2/werk/Werkzeug-0.15.5-py2.py3-none-any.whl
Using version 0.15.5 (newest of versions: 0.15.5)
Installing collected packages: Werkzeug
Successfully installed Werkzeug-0.11.15
Cleaning up...
Try this command:
pip install Werkzeug-0.15.5.tar.gz
and the result must be like this:
Processing ./Werkzeug-0.15.5.tar.gz
Installing collected packages: Werkzeug
Running setup.py install for Werkzeug ... done
Successfully installed Werkzeug-0.15.5
This behaviour can happen because pip by default works with system Python which is located in /usr/bin/ on Linux. When installing the package, by giving Python --user flag your package is installed in your user's version of Python, probably located somewhere in ~/.local/.
To solve the problem you can install the package to your system Python, which is generally not recommended without --user flag. Another option is to use virtual environments and have the distribution that is made specifically for your project. Currently the recommended way is using venv.
$ python -m venv env
$ source env/bin/activate
(env) $ pip install ... (packages you need to install without --user flag)
(env) $ pip freeze
# should give you the packages you installed
This can help you not only with this example, but it can always keep your system Python installation clean and if you mess something up, you will only mess the environment you are having for specific project.
So I've installed python via homebrow. When I do brew info python I get this:
python: stable 3.6.5 (bottled), devel 3.7.0rc1, HEAD
Interpreted, interactive, object-oriented programming language
https://www.python.org/
/usr/local/Cellar/python/3.6.5_1 (5,107 files, 103.0MB) *
Poured from bottle on 2018-06-18 at 10:15:49
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/python.rb
==> Dependencies
Build: pkg-config ✔, sphinx-doc ✘
Required: gdbm ✔, openssl ✔, readline ✔, sqlite ✔, xz ✔
Optional: tcl-tk ✘
==> Options
--with-tcl-tk
Use Homebrew's Tk instead of macOS Tk (has optional Cocoa and threads support)
--devel
Install development version 3.7.0rc1
--HEAD
Install HEAD version
==> Caveats
Python has been installed as
/usr/local/bin/python3
Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
/usr/local/opt/python/libexec/bin
If you need Homebrew's Python 2.7 run
brew install python#2
Pip, setuptools, and wheel have been installed. To update them run
pip3 install --upgrade pip setuptools wheel
You can install Python packages with
pip3 install <package>
They will install into the site-package directory
/usr/local/lib/python3.6/site-packages
See: https://docs.brew.sh/Homebrew-and-Python
I'm ultimately trying to do pip3 install numpy but when I do that, I get this message:
-bash: pip3: command not found
pip install numpy seems to point to the Apple default 2.7 python version:
Requirement already satisfied: numpy in /Library/Python/2.7/site-packages (1.14.5)
So the problem seems to be in my .bash_profile as which python gives /usr/bin/python.
Here's what that looks like:
export PATH=/usr/local/bin:$PATH
export PATH=/usr/local/Cellar/python/3.6.5_1/bin:$PATH
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
export PATH=$PATH:/Users/thammond/Library/Android/sdk/platform-tools
###########
export PATH=/usr/local/Cellar/postgresql\#9.6/9.6.6/bin:$PATH
###########
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
I confirmed that /usr/local/ was listed at the top and also tried adding in export PATH=/usr/local/Cellar/python/3.6.5_1/bin:$PATH
But it's still finding the wrong python. Any ideas where I'm going wrong?
EDIT:
When I run python3 -m ensurepip --upgrade I see this:
Requirement already up-to-date: setuptools in ./Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
Requirement already up-to-date: pip in ./Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
When I run python3 -m ensurepip -vvv -U I get this:
Ignoring indexes: https://pypi.python.org/simple
0 location(s) to search for versions of setuptools:
Skipping link /var/folders/7d/xvqc5yxs10n6206lytrbs9wm0000gn/T/tmpk6_9t6c2 (from -f); not a file
Skipping link file:///private/var/folders/7d/xvqc5yxs10n6206lytrbs9wm0000gn/T/tmpk6_9t6c2/pip-9.0.3-py2.py3-none-any.whl; wrong project name (not setuptools)
Found link file:///private/var/folders/7d/xvqc5yxs10n6206lytrbs9wm0000gn/T/tmpk6_9t6c2/setuptools-39.0.1-py2.py3-none-any.whl, version: 39.0.1
Local files found: /private/var/folders/7d/xvqc5yxs10n6206lytrbs9wm0000gn/T/tmpk6_9t6c2/setuptools-39.0.1-py2.py3-none-any.whl
Installed version (39.2.0) is most up-to-date (past versions: 39.0.1)
Requirement already up-to-date: setuptools in ./Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
0 location(s) to search for versions of pip:
Found link file:///private/var/folders/7d/xvqc5yxs10n6206lytrbs9wm0000gn/T/tmpk6_9t6c2/pip-9.0.3-py2.py3-none-any.whl, version: 9.0.3
Skipping link file:///private/var/folders/7d/xvqc5yxs10n6206lytrbs9wm0000gn/T/tmpk6_9t6c2/setuptools-39.0.1-py2.py3-none-any.whl; wrong project name (not pip)
Local files found: /private/var/folders/7d/xvqc5yxs10n6206lytrbs9wm0000gn/T/tmpk6_9t6c2/pip-9.0.3-py2.py3-none-any.whl
Installed version (10.0.1) is most up-to-date (past versions: 9.0.3)
Requirement already up-to-date: pip in ./Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
Cleaning up...
When I look in /usr/local/Cellar/python/3.6.5_1/bin/ with finder I don't see a pip/pip3 file.
Did you try to invoke /usr/local/Cellar/python3/3.6.5_1/bin/pip3 ? If it works, it means pip installation has been successfuly completed and your bashfile will be wrong. However, the bashfile looks normal for me.
Did you confirm that there is pip3 in /usr/local/Cellar/python3/3.6.5_1/bin/?
If it does not exist, pip is not installed in the first place.
It seems to have the same problem with this page ("pip3 not installed with python 3.4.2 #33897").
The questioner of "pip3 not installed with python 3.4.2 #33897" have finaly solved it by removing /private/var/folders/hy/l_6wd1ps0nz835v4g41zhhtr0000gn/T/pip_build.
It may be because of Brew had failed to complete pip installation.
First, to bootstrap the pip installer, hit python3 -m ensurepip --upgrade and python -m ensurepip.
If it won't work, try to hit python3 -m ensurepip -vvv -U and tell what do it say.
I'm not really sure why it worked this time but just for kicks I decided to uninstall and reinstall python from homebrew again but this time it worked and pip3 installed correctly and works.
brew uninstall python3
brew install python3
now I can run pip3 install numpy --user
Something went wrong with the homebrew-installed python 2.7.13 installation, so I cleaned out everything installed with homebrew and started from scratch. I still get the error below, referencing a file from PIL (Pillow has been installed with pip). How can I fix this library which seems to be corrupted, yet was just reinstalled?
$ python2 src/ks.py
--- module "start"
Traceback (most recent call last):
File "src/ks.py", line 29, in <module>
from PIL import ImageTk, Image
File "/usr/local/lib/python2.7/site-packages/PIL/ImageTk.py", line 42, in <module>
from . import Image
File "/usr/local/lib/python2.7/site-packages/PIL/Image.py", line 60, in <module>
from . import _imaging as core
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/PIL/_imaging.so, 2): Symbol not found: _clock_gettime
Referenced from: /usr/local/lib/python2.7/site-packages/PIL/.dylibs/liblzma.5.dylib (which was built for Mac OS X 10.12)
Expected in: /usr/lib/libSystem.B.dylib
in /usr/local/lib/python2.7/site-packages/PIL/.dylibs/liblzma.5.dylib
Here's everything I've done getting to this point:
- check brew list is empty
- install python#2
- list the pip-installed items
- update pip
- uninstall Pillow (just to make sure)
- list the pip-installed items (make sure uninstall succeeded)
- reinstall Pillow
- list the pip-installed items (make sure reinstall succeeded)
- run my script
- I also checked python2 --version and pip --version and both confirm the homebrew install is separate from the system-installed python.
+++++++++++++++++++++++++++++++++++++++++
$ brew list
gdbm python readline xz
openssl python#2 sqlite
[user#host]
$ brew install python#2
==> Downloading https://homebrew.bintray.com/bottles/python#2-2.7.14_3.el_capitan.bo
Already downloaded: /Users/benfound/Library/Caches/Homebrew/python#2-2.7.14_3.el_capitan.bottle.1.tar.gz
==> Pouring python#2-2.7.14_3.el_capitan.bottle.1.tar.gz
==> /usr/local/Cellar/python#2/2.7.14_3/bin/python -s setup.py --no-user-cfg install
==> /usr/local/Cellar/python#2/2.7.14_3/bin/python -s setup.py --no-user-cfg install
==> /usr/local/Cellar/python#2/2.7.14_3/bin/python -s setup.py --no-user-cfg install
==> Caveats
Pip and setuptools have been installed. To update them
pip install --upgrade pip setuptools
You can install Python packages with
pip install <package>
They will install into the site-package directory
/usr/local/lib/python2.7/site-packages
See: https://docs.brew.sh/Homebrew-and-Python
==> Summary
🍺 /usr/local/Cellar/python#2/2.7.14_3: 4,602 files, 81.9MB
[user#host]
$ pip list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
Pillow (5.1.0)
pip (9.0.3)
setuptools (38.5.2)
wheel (0.30.0)
You are using pip version 9.0.3, however version 10.0.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[user#host]
$ pip install --upgrade pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/62/a1/0d452b6901b0157a0134fd27ba89bf95a857fbda64ba52e1ca2cf61d8412/pip-10.0.0-py2.py3-none-any.whl (1.3MB)
100% |████████████████████████████████| 1.3MB 641kB/s
Installing collected packages: pip
Found existing installation: pip 9.0.3
Uninstalling pip-9.0.3:
Successfully uninstalled pip-9.0.3
Successfully installed pip-10.0.0
[user#host]
$ pip uninstall Pillow
Uninstalling Pillow-5.1.0:
Would remove:
/usr/local/lib/python2.7/site-packages/PIL/*
/usr/local/lib/python2.7/site-packages/Pillow-5.1.0.dist-info/*
Proceed (y/n)? y
Successfully uninstalled Pillow-5.1.0
[user#host]
$ pip list
Package Version
---------- -------
pip 10.0.0
setuptools 38.5.2
wheel 0.30.0
[user#host]
$ pip install Pillow
Collecting Pillow
Downloading https://files.pythonhosted.org/packages/df/aa/a25f211a4686f363d8ca5a1752c43a8f42459e70af13e20713d3e636f0af/Pillow-5.1.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.6MB)
100% |████████████████████████████████| 3.6MB 2.8MB/s
Installing collected packages: Pillow
Successfully installed Pillow-5.1.0
[user#host]
$ pip list
Package Version
---------- -------
Pillow 5.1.0
pip 10.0.0
setuptools 38.5.2
wheel 0.30.0
[user#host]
$ python2 src/ks.py
--- module "start"
Traceback (most recent call last):
File "src/ks.py", line 29, in <module>
from PIL import ImageTk, Image
File "/usr/local/lib/python2.7/site-packages/PIL/ImageTk.py", line 42, in <module>
from . import Image
File "/usr/local/lib/python2.7/site-packages/PIL/Image.py", line 60, in <module>
from . import _imaging as core
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/PIL/_imaging.so, 2): Symbol not found: _clock_gettime
Referenced from: /usr/local/lib/python2.7/site-packages/PIL/.dylibs/liblzma.5.dylib (which was built for Mac OS X 10.12)
Expected in: /usr/lib/libSystem.B.dylib
in /usr/local/lib/python2.7/site-packages/PIL/.dylibs/liblzma.5.dylib
[user#host]
I checked to make sure xcode-select CLI tools are installed, and deleted and reinstalled them to make sure...
$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
[user#host]
$ rm -rf /Library/Developer/CommandLineTools/
[user#host]
$ sudo !!
sudo rm -rf /Library/Developer/CommandLineTools/
Password:
[user#host]
$ xcode-select --install
xcode-select: note: install requested for command line developer tools
[user#host]
I've also tried brew doctor, which gave an issue with the PATH, which I fixed with an update to .bash_profile:
[user#host]
$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/git/bin
$ brew doctor
...(snip)
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
python
Warning: /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:
...(snip)
Consider setting your PATH so that /usr/local/bin
occurs before /usr/bin. Here is a one-liner:
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile
[user#host]
$ echo $PATH
/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/git/bin
... but the same error still persists. What is the corrupted module or library, and how do I fix it? Does something need to be repaired in the system-level python install, or does the OS need to be reinstalled?
This is using OS X 10.11.6 (El Capitan). Upgrading is not currently an option (to 10.12.x or higher). I recently tried running the newest version of xcode on this host, however it wasn't supported by the OS and I deleted the app after finding this out. I'd consider it realistic that this could have corrupted something, but I already reinstalled the xcode tools.
This question was answered with additional troubleshooting here. The root cause is a bug in Pillow 5.1.0.
Downgrade your Pillow version to 5.0.0
pip install --force-reinstall Pillow==5.0.0
I have been following the instructions on http://docs.python-guide.org/en/latest/starting/install/osx/ but for some reason this is not going as I believe it would be expected.
I have python 2.7 running by default but had to get easy_install up-to-date by following the instructions on: https://superuser.com/questions/256717/easy-install-the-wrong-version-of-python-modules-mac-os and link it from /usr/local/bin/share to /usr/local/bin. It seems to be working fine.
The problem is that now when I install pip it seems to install to 2.6 and not 2.7.
darky:~ user$ easy_install --upgrade pip
Searching for pip
Reading http://pypi.python.org/simple/pip/
Reading http://pip.openplans.org
Reading http://www.pip-installer.org
Best match: pip 1.1
Processing pip-1.1-py2.6.egg
pip 1.1 is already the active version in easy-install.pth
Installing pip script to /usr/local/bin
Installing pip-2.6 script to /usr/local/bin
Using /Library/Python/2.6/site-packages/pip-1.1-py2.6.egg
Processing dependencies for pip
Finished processing dependencies for pip
After the comments from MartijnPieters this problem NO LONGER persists
darky:~ user$ /usr/local/share/python/easy_install-2.7 pip
Searching for pip
Best match: pip 1.1
Processing pip-1.1-py2.7.egg
pip 1.1 is already the active version in easy-install.pth
Installing pip script to /usr/local/share/python
Installing pip-2.7 script to /usr/local/share/python
Using /usr/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip
darky:~ user$ pip install virtualenv --upgrade
Requirement already up-to-date: virtualenv in /Library/Python/2.6/site-packages
Cleaning up...
But pip still creates environments with python-2.6. So I have to point it to the proper pyhton interpreter.
darky:pytravisci pedrorodrigues$ virtualenv --python=/usr/local/bin/python2.7 ENV
Running virtualenv with interpreter /usr/local/bin/python2.7
New python executable in ENV/bin/python
Installing setuptools............................done.
Installing pip...............done.
You can use
easy_install-2.7
or if you don't have that alias:
python2.7 -m easy_install <stuff>
For pip:
pip2.7