如何在32位安装Python软件包,但在64位上也可以在视觉代码上使用?例如Pytorch
我用 (1)64位的Windows 11,
(2)Python 3.7.8; python 3.8.3 for 32bit
(3)Visual Studio代码。
我注意到我所有的Python包都安装在32bit上,是否有任何方法可以使我的包裹在64位上工作?,因为我希望使用 pytorch ,但是仅在64位上工作,
我还在视觉代码中安装了 pytorch ,但是它没有安装在我的python环境中...为什么?
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:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您已经在jupyter笔记本中选择了
python3.7.8(64)
,而在python3.8.3(32)
环境中安装了Python模块。因此,它将提示没有名为“ pandas”
的模块。看起来Torch没有32位版本,如果要使用它,则需要选择
Python3.7.8(64)
。因此,您可以首先通过打开Python文件来激活终端,然后单击Vscode右下方的Python解释器,或选择
python:选择Python Instracter
。然后,进行 ctrl+Shift+`的快捷方式,以创建具有激活的Python环境的新终端。之后,您可以在正确的位置安装模块。
您可以参考官方文档 for更多细节。
You have selected
Python3.7.8(64)
in the jupyter notebook, while you have installed the python modules in thePython3.8.3(32)
environment. So it will promptNo 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.