How to get python packages installed for 32 bit before but works on 64bit as well in Visual Code? E.g. Pytorch
Question:
I use
(1) Windows 11,
(2) Python 3.7.8 for 64bit ;
Python 3.8.3 for 32bit
(3) Visual Studio Code.
I noticed that all my python packages are installed on 32Bit, is there any way to get my packages works on 64bit as well? Because I wish to use Pytorch, however, it only works on 64bit
I also installed PyTorch in Visual code, but it does not appear installed in my python environment…Why?
I tried to install PyTorch by pip and it gives me error as below:
Answers:
You have selected Python3.7.8(64)
in the jupyter notebook, while you have installed the python modules in the Python3.8.3(32)
environment. So it will prompt No module named 'pandas'
.
And looks like torch has no 32bit version, if you want to use it, you need to select Python3.7.8(64)
.
So, you can activate the terminal first through open a python file and then clicking the python interpreter on the bottom-right of the VSCode or choosing Python: Select Python interpreter
in the command palette directly.
Then take the shortcut of Ctrl+Shift+` to create a new terminal with the activated python environment. After this, you can install the modules in the right place.
You can refer to the official docs for more detail.
I use
(1) Windows 11,
(2) Python 3.7.8 for 64bit ;
Python 3.8.3 for 32bit
(3) Visual Studio Code.
I noticed that all my python packages are installed on 32Bit, is there any way to get my packages works on 64bit as well? Because I wish to use Pytorch, however, it only works on 64bit
I also installed PyTorch in Visual code, but it does not appear installed in my python environment…Why?
I tried to install PyTorch by pip and it gives me error as below:
You have selected Python3.7.8(64)
in the jupyter notebook, while you have installed the python modules in the Python3.8.3(32)
environment. So it will prompt No module named 'pandas'
.
And looks like torch has no 32bit version, if you want to use it, you need to select Python3.7.8(64)
.
So, you can activate the terminal first through open a python file and then clicking the python interpreter on the bottom-right of the VSCode or choosing Python: Select Python interpreter
in the command palette directly.
Then take the shortcut of Ctrl+Shift+` to create a new terminal with the activated python environment. After this, you can install the modules in the right place.
You can refer to the official docs for more detail.