On 04/18/2017 11:14 AM, Alan Gauld via Tutor wrote:
> On 18/04/17 17:55, Rafael Knuth wrote:
>> I wanted to start my first project using matplotlib (I have never
>> worked with libraries before). 
> 
> Every time you do an import you are using a library.
> eg
> 
> import sys
> import os
> etc
> 
> It's no big deal.
> 
>> I am trying to get started with VS Community 2017, 
>> and I am having trouble performing the most basic
>> tasks such as installing matplotlib. Anyone here using VS 2017? 
> 
> VS is great for .NET development for Windows but frankly
> for anything else I prefer Eclipse or Netbeans as IDEs.
> But personally I don't much like big greedy IDEs (unless
> I'm writing Java) so I tend to just use a text editor
> (vim or notepad++ on windows) and a Python shell
>  - possibly even IDLE. I also use the Pythonwin IDE
> if I'm doing any COM type work because of its debugger
> and built in COM browser.
> 
> But editors and IDEs are very personal choices. The best
> thing is to download a few and play with them. There is
> no shortage of candidates to pick from!
> 

PyCharm :)

anyway, some thoughts on using VS, which I only recommend if you're
already a dedicated VS user (same general comment as Alan).

"libraries" other than the python standard library do need installation,
which in many cases is done through the PIP tool (on Windows there are
often also pre-built packages installed the normal way, which you can
resort to if something doesn't work using PIP - since you have a full
build environment known to be there with VS 2017, it should work though.

VS has a Python tools addon, which you should install if it's not there
already.

you can then go Tools -> Options -> Python Tools -> Environment Options

look at the paths in the existing environment (matching your installed
Python version) and remember them

create a new environment by clicking Add Environment (the existing one
will probably work, but I don't know how to get around VS's idea it's
fully managing it, and we want to install packages).

in new environment,  fill in the paths.  There's a way to auto-detect
(in a different screen) but on my VS 2015 install at least it seems to
always be greyed out.

You should have a Python Environments on the right, another tab where
there's usually the Solution Explorer.  If it's not open, you can get it
from View -> Other Windows.

pick "pip" from the drop-down, and search for the pkgs you want - just
typing matplotlib should give you a bunch of choices, and that should
also deal with dependencies.  That windo may also offer some existing
pkgs that need updating.


anyway, this sort of thing has worked for me in limited experiments.
Then it's just "import whatever" as Alan says.




_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to