How to add a package to python in Visual Studio 2017 How to add a package to python in Visual Studio 2017 python python

How to add a package to python in Visual Studio 2017


You can, however it is not perfect.

Firstly you need to bring up the Python Environments menu which can be accessed by going:

Tools -> Python -> Python Environments

It should bring up a sidebar (depending on how you have VS setup). There should be a dropdown box about half way down with the text "Overview". Click on that and you can select "Packages". This will bring up a textbox under it that will allow you to use standard pip commands to install packages.

If you are on Windows though there is one added step for some packages though. As pip does not work well on Windows, due to the fact that the standard Windows package site (PyPI) does not yet have Windows wheels for a lot of common packages.

Therefore, you are best off going to Christoph Gohlke's unofficial package site and then downloading the package you need. Once it's downloaded locally just copy and paste the LOCAL address into the textbox under "Packages". It will then install the package and you'll be good to go.


I had same problem and i could get it working with visual studio 2017 python v3.6 using following instructions

Install appropriate .whl file using this link(cpMN where you have Python M.N). contrib includes OpenCV-extra packages. For example, assuming you have Python 3.6, you might download **opencv_python-3.2.0+contrib-cp36-none-win_amd64.whl**

link to download

Then install it by running this command from installed folder

pip install opencv_python-3*win_amd64.whl