Active1 month ago
- How To Install Python Tools For Visual Studio
- Python Tools For Visual Studio
- Python Tools For Visual Studio 2017
- Visual Studio
Python Tools for Visual Studio Mac. It would be great to have support for python for mac os, just like the one for windows. Installation should be intuitive like it's already done in windows 10350-installer.png (picture attached) thub.nodes.view.add-new-comment.
I'm collaborating with some fellow students to build a python app, and was hoping to use the 'training wheels' of Visual Studio intelli-sense. They use python on mac and linux, so ideally our source control repo would consist of just
*.py
source files that we wrote, and a requirements.txt
export of pip dependancies (using the pip freeze
method).I would love to be able to create a new Visual Studio project, then be able to run the following commands (for instance) within that project:
And after that, be able to write some code that references these libraries and be able to run it from within Visual Studio.
Is there any way to do this? Is Python within Visual Studio even able to handle modules in the format they are available within pip, or do all python libraries used in VS have to have been pre-compiled for Windows?
Thanks in advance for any help!
Pavel Minaev87.3k2323 gold badges198198 silver badges269269 bronze badges
MattMatt2,53133 gold badges2929 silver badges3636 bronze badges
6 Answers
Yep! Go to
Tools
->Python Tools
->Python Environments
.This will open a new pane where you can select
pip
from the menu (it will say Overview
by default) and then you can enter your module and double click to install.Some packages have complex dependencies, and you might need to install them manually from these links:
numpy
http://sourceforge.net/projects/numpy/files/NumPy/scipy
http://sourceforge.net/projects/scipy/files/scipy/Matplotlib
http://matplotlib.org/downloads.htmlPandas
http://pandas.pydata.org/getpandas.html
How To Install Python Tools For Visual Studio
Charles Clayton8,57888 gold badges5959 silver badges9191 bronze badges
On VS 2017, switch to the 'solution explorer' and right click as indicated:
Den-JasonDen-Jason
From the mention of Visual Studio, it sounds like you're using Python Tools for Visual Studio. If so, then support for pip, easy_install and virtualenv is one of the new features in PTVS 2.0 beta - get it and give it a try. Once you add an interpreter reference to your project, you'll find commands to install a package in context menu for that interpreter in Solution Explorer.
This way, you also do not have to set up pip yourself, since PTVS will do it for you the first time you try to install a package.
Pavel MinaevPavel MinaevPython Tools For Visual Studio
87.3k2323 gold badges198198 silver badges269269 bronze badges
Yes you can, here is a simple guide taken from here https://zignar.net/2012/06/17/install-python-on-windows/
Before you can install Pip, you'll need setuptools or distribute. If you're using Python3, you must use distribute as setuptools doesn't support Python 3.x
To install distribute download the setup file here https://pypi.python.org/pypi/distribute/0.6.27 and invoke it using python.
python.exe C:Pathtodistribute_setup.py
Now that distribute is installed, Pip can also be installed. Download get-pip.py here https://raw.github.com/pypa/pip/master/contrib/get-pip.py and invoke it in the same way you invoked distribute_setup:
python.exe c:Pathtoget-pip.py
After that Pip is installed. But you might want to add C:Python32Scripts to the Path Systemvariable too (see step 1). So you can execute pip.exe from any location.
AxelAxel
When you install Python support with Visual Studio, the PIP executable can be found in
C:Program Files (x86)Microsoft Visual StudioSharedPython36_64Scripts
If it isnt there, type the following at a command prompt to find out Pythons install locationpy --location
Then either add the location to path, or run pip with the full path from powershell. 'C:Program Files (x86)Microsoft Visual StudioSharedPython36_64Scriptspip.exe' install pillow
Neil HighleyNeil Highley
and you can set your path to pip like this:
Run
Dov Benyomin Sohacheskiset PATH='C:Program Files (x86)Microsoft Visual StudioSharedPython36_64'
3,04955 gold badges2222 silver badges4444 bronze badges
Synat KhimSynat Khim
![Mac Mac](/uploads/1/2/6/5/126588283/859210493.png)
Python Tools For Visual Studio 2017
Not the answer you're looking for? Browse other questions tagged pythonvisual-studiopipptvs or ask your own question.
IntelliSense, Azure development, profiling, and world class debugging tools for Python developers
Python is NOT supported on Visual Studio for Mac.
Visual Studio
To see what languages are supported, click hereAn editor that knows your code
Let Visual Studio think about your code and tell you which types go where. Tooltips, completions and code snippets make you more productive.
Find and install the libraries you need
Third-party libraries are the fastest way to solve your problems. Use our pip, PyPI and virtual environment support to manage your projects and dependencies.
Interactively diagnose issues with your code on Windows and Linux
None of us write perfect code all the time, but when it goes wrong Visual Studio can help. Visually step through your code, view or modify state, and interact with your program regardless of the operating system.
Git and TFS without a command line
Manage your Git/TFS projects, pending changes, and branches with ease using Team Explorer, or check out one of the many source control extensions available for Visual Studio.
Validate your changes in the editor
Make sure your code is working correctly without leaving Visual Studio. View, edit, run, and debug unit test-style tests from the Test Window.
Fork us on Github
![Python Tools For Visual Studio Mac Python Tools For Visual Studio Mac](/uploads/1/2/6/5/126588283/193544882.png)
Python Tools for Visual Studio is a completely free extension, developed and supported by Microsoft with contributions from the community. Visit our Github page to see or participate in PTVS development.
Free, fully-featured IDE for students, open-source and individual
developers
developers
Professional developer tools, services, and subscription benefits for small
teams
teams
End-to-end solution to meet demanding quality and scale needs of teams of all
sizes
sizes