Reputation: 839
I currently have both Python 2.6 and 2.7 running on my Linux machine.
Now, from Python 2.7, I can't access the libraries that I installed through package manager for Python 2.6.
I tried uninstalling the library and installing it back with Python 2.7 installed as my default runtime. No luck.
How can I share libraries between two Python instances? Is there a more correct way to do this than just copying them?
If useful: my Linux distro is Debian, and my package manager is apt
.
Upvotes: 2
Views: 126
Reputation: 1723
You should be able to install the files to an external location and define the environment variable PYTHONPATH
to point to the directory that contains the modules.
Upvotes: 4
Reputation: 115
You should have now both a /usr/lib/python2.6 folder and a /usr/lib/python2.7. Try creating links inside the 2.7 folders to the required files or folders inside the 2.6 folder.
Upvotes: 0