0

I installed Linux Mint as Virtual Machine. When I do:

python --version

I get:

Python 2.7.6

I installed seperate python folder acording to this. and When I do:

python2.7 --version

I get:

Python 2.7.11

Now, I want to work only on Python 2.7.11

I installed pip and installed a package using pip with pip install paypalrestsdk It was successfull:

enter image description here

However when I run the script using this package I get: enter image description here

i suspect that pip and the install were done on the python 2.7.6 rather than the python 2.7.11 What can I do?

java
  • 1,124
  • 2
  • 14
  • 33

3 Answers3

0

Since you get the right Python version by running python2.7, you could use pip2.7 to install packages in it:

pip2.7 install paypalrestsdk
Dmitry Grigoryev
  • 3,156
  • 1
  • 25
  • 53
0

Use virtual environment http://docs.python-guide.org/en/latest/dev/virtualenvs/ to manage different versioned libraries. Install the wanted libraries in the environment created.

mkvirtualenv myenv --python=/usr/bin/python2.6 
workon myenv
pip install paypalrestsdk
  • You need to add virtualenvwrapper.sh to your path http://stackoverflow.com/questions/21928555/virtualenv-workon-command-not-found – Rajesh Veeranki Apr 03 '16 at 14:32
0
wget https://bootstrap.pypa.io/get-pip.py
python2.7 get-pip.py

Using this pip install:

pip install paypalrestsdk

Good luck!

Snuggert
  • 165
  • 7