Answer the question
In order to leave comments, you need to log in
Problem with pip and python 3?
Trying to install pip install python-twitter.
B here is what I get that the package takes under the 3rd version which is also installed how to change the default usage for 2.7?
[email protected]:~$ sudo pip install python-twitter
Traceback (most recent call last):
File "/usr/local/bin/pip", line 7, in
from pip import main
File "/usr/local/lib/python3 .2/dist-packages/pip/__init__.py", line 11, in
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/local/lib/python3.2/dist-packages/pip /vcs/mercurial.py", line 9, in
from pip.download import path_to_url
File "/usr/local/lib/python3.2/dist-packages/pip/download.py", line 22, in
from pip._vendor import requests, six
File "/usr/local/lib/python3.2/dist-packages/pip/_vendor/requests/__init__.py", line 58, in
from . import utilities
File "/usr/local/lib/python3.2/dist-packages/pip/_vendor/requests/utils.py", line 25, in
from .compat import parse_http_list as _parse_list_header
File "/usr/local/lib/python3. 2/dist-packages/pip/_vendor/requests/compat.py", line 77, in
import simplejson as json
File "/usr/local/lib/python3.2/dist-packages/simplejson/__init__.py", line 114, in
from .encoder import JSONEncoder, JSONEncoderForHTML
File "/usr/local/lib/python3.2/dist-packages/simplejson/encoder.py", line 21
ESCAPE = re.compile(u'[\\x00-\ \x1f\\\\"\\b\\f\\n\\r\\t\u2028\u2029]')
Answer the question
In order to leave comments, you need to log in
I think a solution with a separate virtualenv environment will suit you:
virtualenv ~/my_env_for_work -p /usr/bin/python2.7
source ~/my_env_for_work/bin/activate
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question