How can I use virtualenv to use 32-bit and 64-bit Python in Windows?

后端 未结 3 520
抹茶落季
抹茶落季 2021-02-10 22:55

I have 64-bit Python (2.7.5) installed at C:\\Python27 and 32-bit Python at C:\\Python27_32.

I would like to use virtualenv to set up a 32-bit

3条回答
  •  一向
    一向 (楼主)
    2021-02-10 23:32

    in command prompt Use: set CONDA_FORCE_32BIT=1 conda create -n virtualenv_name python=x.x anaconda

    The above can be found @ How to install win-32 package on a 64-bit system with conda install I personally tried it and it worked successfully (32-bit python x.x installed). Using Anaconda is not necessary but it will install all of the anaconda packages like pandas.

    Disclaimer: The comment below is a caution and not an attack on the answer submitted by anyone else.

    As my friend told me "changing the path manually is discouraged, mostly because you'd have to inform other applications that use Python (and that you do not necessarily know of) to point to a different folder, and changes are not certain to be consistent across your system. In a way, virtualenvs do the same but in a cleaner and (sort of) predictable fashion".

提交回复
热议问题