简体   繁体   English

如何正确设置 Visual Studio 以使用已安装的 Python 和包

[英]How do I properly setup Visual Studio to use already installed Python and Packages

I have added a custom environment:我添加了一个自定义环境: 在此处输入图片说明

and set PYTHONPATH to the site-packages that pip installs its packages:并将 PYTHONPATH 设置为 pip 安装其软件包的站点软件包: 在此处输入图片说明

Yet... the interactive interpreter does not find my packages already installed:然而......交互式解释器没有找到我已经安装的软件包: 在此处输入图片说明

Of course it works fine in a terminal:当然,它在终端中工作正常: 在此处输入图片说明

What am I missing?我错过了什么?

I think you need to refer to the tutorial of Installing packages and managing Python environments(Python in VS) and download and install pip package manager (if you didn't download it, you would not be able to search PyPI and installed packages) in Visual Studio.我觉得你需要参考安装包和管理Python环境(VS中的Python)教程,下载并安装pip package manager (如果你没有下载,你将无法搜索到PyPI和安装的包)视觉工作室。 Then search inside the Search box( Search PyPI and installed packages ) to download and install the related packages.然后在搜索框内搜索( Search PyPI and installed packages )以下载并安装相关的包。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何检测使用python脚本安装的Visual Studio版本 - How do I detect the version of visual studio installed with a python script PyCharm安装包怎么使用? - How do I use installed packages in PyCharm? 如何在python应用程序中的Visual Studio 2017中使用用户包 - How to use user packages in Visual Studio 2017 in a python application 如何使用已经安装的 Python? - How to use an already installed Python? 如何在 Pycharm 中使用已安装的 python 包? - How can I use installed python packages in Pycharm? 手动/本地安装的 python 包不显示在 Visual Studio 中 - Manually/locally installed python packages dont show up in visual studio 当已经在C:\\ path \\ Anaconda3 \\…中安装软件包时,如何为C:\\ Python27安装软件包(或使用现有软件包)? - How to install packages (or use existing packages) for C:\Python27 when these are already installed in C:\path\Anaconda3\…? 如果我使用 Visual Studio 安装 python,如何从终端运行它? - How to run python from the terminal if I installed it using Visual Studio? 如果我已经安装了Anaconda Python,如何在R中使用TensorFlow? - How to use TensorFlow in R if I have Anaconda Python already installed? 如何删除Visual Studio的Python工具(2016年6月)更新通知? 它已经安装好了 - How to remove Python tools for Visual Studio (June 2016) update notification? It's already installed
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM