1

My normal packages are located in /usr/local/lib/python2.7/dist-packages

I have another loose hanging folder named dist-packages that contains several custom python packages taken from a different VM.

Does anyone know if a simple cp the contents of of dist-packages to /usr/local/lib/python2.7/dist-packages do the trick? I don't want to do it and then have to manually sort out which files don't belong if it doesn't work.

Edit: Or ideally a way for python2.7 to reference the path of custom dist-packages.

Linsu Han
  • 135
  • 1
  • 8

1 Answers1

0

You are not guaranteed to be able to do that.

IF the versions of python from both the parent directories of the two dist-packages is the same, then it will work, but you have to make sure it's the exact same version. Provided they are, you can do:

$ cp -r [path_to_loose_folder]/dist-packages/* /usr/local/lib/python2.7/dist-packages/
Eduardo Barrera
  • 516
  • 7
  • 17