I am moving to Ubuntu 22.04 from Windows 10 and I was wondering if I could skip installing again all the packages I did on my Windows 10 machine on Python 2.7. Is it possible to save the package folders and paste them into the Python installation folder in Ubuntu?
>Solution :
It depends on what those packages contain. I wouldn’t expect that 100% of packages would work, so if you want to save time (and frustration), then reinstall all packages for Linux, or run Python in a Windows VM or in Wine.
Details:
-
.dllfiles don’t work on Linux. Linux has.sofiles (of different format) instead. -
.pycand.pyofiles work only if the Python version and some compilation flags match exactly. This is unlikely: a random Python version (e.g. 2.7.x) on Windows won’t match a random Python vrsion (e.g. 2.7.y) on Linux. -
.pyfiles are usually system-independent, most of them will thus work unchanged.