简体   繁体   中英

Line number of edit window not showing in interactive window using Visual Studio and conda enviroment

I created a python project with Visual Studio, expecting to develop with conda and ipython, so I set the enviroment to Conda, and made sure to check the ipython within it...

I am expecting the following result, which has references to line numbers in the interactive window:

结果

Turns out that i am getting this (without the line number):

在此处输入图像描述

What am I missing to achieve the desired result?

For this walkthrough you should have the Anaconda environment installed, which includes IPython and the necessary libraries:

  1. Open Visual Studio, switch to the Python Environments window (View > Other Windows > Python Environments), and select an Anaconda environment.
  2. Examine the Packages (Conda) tab (which may appear as pip or Packages) for that environment to make sure that ipython and matplotlib are listed. If not, install them here. (See Python Environments windows - Packages tab.)
  3. Select the Overview tab and select Use IPython interactive mode. (In Visual Studio 2015, select Configure interactive options to open the Options dialog, then set Interactive Mode to IPython, and select OK).
  4. Select Open interactive window to bring up the Interactive window in IPython mode. You may need to reset the window if you have just changed the interactive mode; you might also need to press Enter if only a >>> prompt appears, so that you get a prompt like In [2].

https://docs.microsoft.com/en-us/visualstudio/python/tutorial-working-with-python-in-visual-studio-step-01-create-project?view=vs-2019

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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