简体   繁体   English

打开Django Shell时出错-Visual Studio中的Python交互式窗口

[英]Error While Opening Django Shell - Python Interactive Window in Visual Studio

I just wanna mention that i'm just learning python & django so i'm a newbie and i need help. 我只想说我只是在学习python和django,所以我是新手,我需要帮助。 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 这是我的问题-我正在上课-https: //mva.microsoft.com/zh-CN/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 然后我尝试通过右键单击DatabaseFun(解决方案资源管理器中的我的项目名称)打开Python交互式窗口> Python>打开Django Shell

And the Django Management Console -DatabaseFun windows opens up with error : 并且Django Management Console -DatabaseFun窗口打开,并显示错误:

" Python interactive window. Type $help for a list of commands. An internal error has occurred in the Interactive window. Please restart Visual Studio. " “ Python交互式窗口。键入$ help作为命令列表。”交互式“窗口中发生内部错误。请重新启动Visual Studio。”

And the Django Management Console -DatabaseFun window seems to be disconnected 并且Django Management Console -DatabaseFun窗口似乎已断开连接

Additional Details - I've installed Python 3.5 - 32bit Visual Studio 2015 其他详细信息-我已经安装了Python 3.5-32位Visual Studio 2015

Screenshots - View post on imgur.com 屏幕截图- 在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. IMO Visual Studio对于使用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. 如果您是初学者,并且真的想使用IDE,则可以尝试PyCharm,否则,您只需要一个简单的文本编辑器(SublimeText,Vim,Emacs)和一个命令行即可。

You'll learn more, and will get rid of bug caused by your IDE (like the one you're having now). 您将学到更多,并且摆脱由IDE引起的错误(就像您现在拥有的那样)。

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. 实际上,该错误似乎与PTVS 2.2有关,这是由github成员建议的,我将其更新为几天前发布的PTVS 2.2.2,该错误消失了。

https://github.com/Microsoft/PTVS/releases/tag/v2.2.2 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) . 只是想发布此答案,以便对某人有用(关于Visual Studio错误,没有看到很多答案)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM