how to pip install 64 bit packages while having both 64 bit and 32 bit versions?

If you have actually managed to install both x64 & x32 packages, you could simply do

C:\path\to\corresponding\python.exe -m pip install <package>

This will ensure you use the correct pip and install the package for the specific python instance.


Starting with Python 3.3, coexistence is made much easier with the Python Launcher for Windows. (Also see PEP 397.) From the command line you can use "py" or "pyw" in place of "python" or "pythonw". The py command allows you to specify the revision and version of python to run. For example, open a command window and type in "py -3". This runs the latest revision of python 3 available and defaults to the 64 bit version if it is available. On the original poster's system, entering this command will start the python 3.5-64 bit interpreter.

This command can also be used to run the correct version of pip without knowing the exact path to the python version you want to install to. "py -3.5 -m pip install [package]" will install [package] to the 64 bit version of python3.5.

If you have both the 64 and 32 bit versions installed and ever need to install to the 32 bit version, you have to enter both the major and minor revision numbers as part of the command and add '-32' to the command argument. "py -3.5-32 -m pip install [package]" will install to the 32 bit version.


If you do have both the 64 and 32 bit versions installed and need to install a 32 bit version package only, you have to enter the target -t (32 bit Lib) with pip3, e.g. install bitcoin lib:

 pip3 install -t C:\Users\
       max\AppData\Local\Programs\Python\Python36-32\Lib bitcoin