Is it possible to upgrade a portable Python 32 bit install to a 64 bit install?

拟墨画扇 提交于 2021-02-06 10:14:13

问题


I've been working on a single program for a few months now, which now requires some additional functionality. Originally, a 32 bit install was just fine, but since I'm now working with massive matrices in scipy, I simply do not have the required RAM in 32bit.

The other problem I have is that my little project has to be very easily transposeable to new systems belonging to people who have no idea what they're doing and just want to click "run", so I did the whole thing with a portable python install.

Would it be possible to "upgrade" my little 2.7 python to 64 bit, or am I condemned to reinstalling every single module in a fresh install?


回答1:


No, it is not possible to upgrade a 32bit Python installation to a 64bit one.

Still, there is something that you can do in order to speedup installation of a new 64bit version.

Run pip freeze > packages.txt on the old installation in order to generate a list of all installed packages and their versions.

After you install the new python version, run pip install -r packages.txt in order to install the same version of the packages that you had on the old installation.

As I see you use scipy, you may want to have a look at Anaconda. It could save you a lot of time.




回答2:


make a backup of you "Lib" folder present in your python installation folder. Now when you install your python 64 bit paste this "Lib" folder there. After this, you don't need to install many modules again.



来源:https://stackoverflow.com/questions/37522943/is-it-possible-to-upgrade-a-portable-python-32-bit-install-to-a-64-bit-install

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!