Using External Python Development Environment

You can run NeuroExplorer Python scripts using a Python development environment of your choice. For example, Visual Studio Code and Spyder are excellent free Python development environments with debugging and auto-completion.

To use an external Python environment:

  • In NeuroExplorer, select Script | Enable Running Python Scripts in External Editor menu command

  • Install nex Python package. Run this command in Windows Command Prompt

    python.exe -m pip install -U nex
    
  • If you get an error message pip: command not found, run this command first to install pip:

    python.exe -m ensurepip --upgrade
    
  • If you are using Anaconda:

    • Type Anaconda Prompt in Windows Search box

    • Select a version of Anaconda Prompt in Best Match panel above Windows Search box

    • Run this command in Anaconda Prompt

      pip install -U nex
      

No changes in your script are required.

If you are using Visual Studio Code:

  • Open Python script in Visual Studio Code or, in NexScript, select menu command File | Open in VS Code

  • In Visual Studio Code, you will see full IntelliSense support (code completion, parameter info, etc.) for nex package:

    ../../../_images/vscode_intel.png
  • Press F5 to debug your script in Visual Studio Code:

    ../../../_images/vscode_debug1.png