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).
Active1 month ago
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:
Visual Studio on a Mac: The Best of Both Worlds. With these tweaks, I’ve come to love using Visual Studio on a Mac. The performance is good, and by running Windows in a virtual machine, I get the best of both OS worlds. Want to see what I’m building with this setup? Check out our open-source.NET SDK on Github. First, we will install Python 3 and then configure it in visual studio code. Then install pip, a package manager for Python programming language and then create a virtual environment and then install Django web framework in mac.
I am trying to remote debug from Visual Studio Code on Mac OS. I would like to know if anyone has managed this or if it only possible from Visual Studio for Windows, or if not, what am I doing wron. Visual Studio for Mac.NET. Azure DevOps. How to install python in vs2017? Windows 10.0 visual studio 2017 Python. The same problem: everywhere it is written that 2017 should support python but it is not present in install or as a separate packages. Solutions Add your solution.
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 Minaev
87.3k23 gold badges198 silver badges269 bronze badges
MattMatt
2,5313 gold badges29 silver badges36 bronze badges
6 Answers
How To Install Python For Linux Mint
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
8,5788 gold badges59 silver badges91 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 Minaev
87.3k23 gold badges198 silver badges269 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
set PATH='C:Program Files (x86)Microsoft Visual StudioSharedPython36_64'
3,0495 gold badges22 silver badges44 bronze badges
Synat KhimSynat Khim