I want to use winpython interpreter for Visual Studio 2017 community edition. I found settings for another IDE here: Using WinPython as Interpreter for PyCharm. Where can I find similar settings for VS 2017 community edition?
(finally my first post after so long following. It's a shame, because it's maybe not the best answer, but it's late here)
You have to add your WinPython as a custom python enviroment.
Following steps:
Open VS an look for Tools > Python > Python Enviroments and then hit "add custom..."
There are several fields to be filled, which are nearly self explained (Path of Interpreter, window-interpreter etc.). I think, if you enter the Interpreter-Path, you can hit the button "auto-fill" on the right side an VS will try to look for the other fields automatically.
That's it. But the more interesting question is "Does Intellisense recognizes the packages in WinPython like scipy?"
Yes. But Intellisense needs a first date with the packages. Otherwise you won't cross the doorstep.
Open Tools > Python > Python Enviroments
Click on your Custom Python environment (WinPython, I still guess) and then click the field, where "configure" is listed an look for the Option "Intellisense". Then VS will look vor all modules. Be patient, at my machine it took some time.
After recognizing all modules (no red ! sign anymore, a blue check), you can hit the new appearing button above "Update Database". This will take less time.
In my case (a few minutes ago) I had to restart VS. When I hit numpy.p either in editor or interactive console, there appears auto-complete with every info you wish to have (in a pythonic, not a general way).
good night!
Sources:
https://learn.microsoft.com/en-us/visualstudio/python/python-environments
Visual Studio How to add Python module to Intellisense
Related
I have been running Visual Studio code on the Mac for about 2 years now and I'm running into issues that I haven't seen before. I have not personally run any updates for Code for quite a while. lets say late November.
1) A message at the lower right of my Work space that says
The macOS system install of Python is not recommended,
some functionality in the extension will be limited.
Install another version of Python for the best
experience.
Unfortunately I can't update to Python 3.x and it shouldn't be up to Code to force me to update. Is there a way to turn this message off?
2) Related to above is that some classes or language keywords (JSONUtils, #unittest, requests, def) are no longer being recognized. Some constants that I have created and a variable defined to store a class.
sc = SomeClass()
This will be recognized at definition but later during usage it will not be recognized.
sc.SomeMethod( 1, 2, 3 )
sc won't be recognized. None of this is making sense to me as it is not a pure pattern. Everything is probably the same issue. Need to point Code to python 2.7.
This is a bug in VS Code. A new future version will have an ignore button.
VS Code Issue 4448
I still can't comment, so here it is an an answer instead...
This looks like a duplicate of How can I change python version in Visual Studio Code?
The short version that worked for me:
CTRL+SHIFT+P to open command palette
Choose "Python: Select Interpreter"
Point VS Code to the Python interpreter you wish to use.
First time posting! Really stuck, need experienced help. I am a mechanical engineering student with a small amount of c programming experience, about to tackle a personal project using Python, which I will learn to use as-I-go.
Trying to add an interpreter to the Python Environment in MS Visual Studio 2015 (VS).
Downloaded Python 3.6, at the time I did not realize 3.5 was recommended by MS for use with VS. VS did not find Python 3.6 automatically, so I tried to add the path manually using "+ Custom...". 3.6 wasn't an option in the edition dropdown, so tried to type it in. When I "Applied", the program stopped working. After restarting VS, Python is still not added, and the "+ Custom" button is greyed out, not allowing me to add the proper Python 3.5 or any other interpreter not automatically recognized.
The only interpreter I have successfully added since is IronPython, which is automatically recognized. Python 3.6, 3.5, 3.4.4 were installed but not automatically recognized.
Web searches only provided this:
https://github.com/Microsoft/PTVS/issues/1760
The person had the same problem but only recovered use of the "+ custom" button by reinstalling his operating system and VS. I would like to avoid this extreme repair strategy.
I have restarted my computer and VS many times throughout troubleshooting. I am confident that once the "+ Custom..." button becomes active, the rest of the interpreter install will go fine.
Alternatively, If there is a lower-level way to add interpreters to the Python Environment, I would attempt that strategy if some guidance were provided.
Thank you for considering
Try to remove PTVS 2.2.5 and install an older version like PTVS 2.2 and you should be able to use the "+ custom" button again...
I just wanna mention that i'm just learning python & django so i'm a newbie and i need help.
Sorry if my question is dumb.
Here is my problem -
I was following the lesson - https://mva.microsoft.com/en-US/training-courses/developing-websites-using-python-and-django-11415?l=uw7LHeEJB_5304300477
And i tried opening the python interactive window by Right Clicking On DatabaseFun (My project name from solution explorer) > Python > Open Django Shell
And the Django Management Console -DatabaseFun windows opens up with error :
" Python interactive window. Type $help for a list of commands.
An internal error has occurred in the Interactive window. Please restart Visual Studio. "
And the Django Management Console -DatabaseFun window seems to be disconnected
Additional Details -
I've installed Python 3.5 - 32bit
Visual Studio 2015
Screenshots -
View post on imgur.com
Please Help , I'm struck for almost 10hours.
Sorry if i don't really answer your question but i suggest that you change the tools you are using.
IMO Visual Studio is far from good to code in python.
If you're a beginner and really want to use an IDE you could try PyCharm otherwise, a simple text-editor (SublimeText, Vim, Emacs) and a command-line are all you need.
You'll learn more, and will get rid of bug caused by your IDE (like the one you're having now).
Actually the error seems to be with the PTVS 2.2 as suggested by a github member i updated it to PTVS 2.2.2 which was released few days ago and the error disappeared.
https://github.com/Microsoft/PTVS/releases/tag/v2.2.2
Just wanna post this answer so that it may be useful for someone (haven't seen many answers for Visual Studio errors) .
I am trying to switch from Pycharm to Visual Studio 2013 (PTVS), however I cannot find how to change settings for auto-completion popups. For example, in Pycharm whenever you start writing something, it automatically gives you a list of possible keywords, like in screenshots below.
If I start to write 'co' pycharm lets me choose 'consecutive' which is an already defined boolean. Is there any way to change these settings in visual studio? I have went through the settings menu like 20 times now, and I am completely stuck.
screenshot of pycharm:
http://i61.tinypic.com/20960wn.png
screenshot of visual studio 2013:
http://i62.tinypic.com/2qtilg1.png
I found the answer by myself - PTVS doesn't support this feature, however there is a plugin, which can be downloaded here, which supposedly fixes this issue:
http://visualstudiogallery.msdn.microsoft.com/644b4359-5eeb-4ba5-9374-78a8507761f0
However, after further inspection, it is broken and doesnt work half as good as pycharm's autocomplete. Most of the time it popups a message saying 'no suggestions' which becomes seriously annoying getting that msg after every single letter.
Bottomline - it is broken.
This is now supported with PTVS. Per the completions section found on the GitHub wiki.
Completions can be shown at any time by pressing Ctrl+J or Ctrl+Space, or may be triggered automatically by certain commands (such as import), operators (such as a period/full stop), or by typing at any place where completions are likely to be helpful.
This question already has an answer here:
Closed 10 years ago.
Possible Duplicate:
What IDE to use for Python?
Are there any Python editors that can run the currently viewed file with an easy keybinding so I don't have to open the command prompt? Bonus points if it can open the Python interpreter too.
Mention any editor you know that can do this, so I have some options to choose from. Bonus points for other handy features like auto code completion, error markup, smart indent, bracket matching, line numbering etc.
Personally, I think the command prompt is the best part ;) But if you insist, try out http://pydev.org/, its the python plugin for eclipse. Its an IDE, and can have auto-completion etc.
If you aren't limited to open source offerings, you can try WingWare IDE:
http://wingware.com/
As far as professional WYSIWYG editors go, it is fairly mature and easy to use. It is available in three versions:
Wing IDE Professional
Wing IDE Personal
Wing IDE 101
Wing IDE 101 is a free version for educators, students and hobbyists. The other two are commercial versions which offer more features than the free version. All three versions of Wing IDE run on Windows, Linux and Mac OS X.
Plus, it meets a number of the features you requested:
Auto-completion, call tips, error indicators, goto-definition, find uses, source browser, code indices, and symbol lookup.
Also refer to this Wikipedia link for some of its features: http://en.wikipedia.org/wiki/Wing_IDE
Emacs
vim
Eclipse and its powerfull pydev plugin
Wingware
Emacs: meta x shell-command will do the trick.
M-x shell-command
followed by
python foo.py
see running commands in emacs.
I use PyDev on top of Eclipse, and I'm currently building a live-coding plugin that runs the code while you type.
For smaller projects with just a few files, I am a big fan of Spyder It is light weight, easy to use, but has many of the features of a full IDE.
If you need a full featured IDE rather than something light weight, then I second Wiz in suggesting Pydev.