在VSCODE中运行简单的Python / Abjad代码
Windows 10,Python 3.10.5
此简单代码
import abjad
n = abjad.Note("c'4")
abjad.show(n)
使用py test.py
从命令行运行时, 可完美地工作。它会自动启动我的PDF查看器,显示以下内容:
但是,当我尝试从Visual Studio代码运行它时,它没有“工作”:它不会启动PDF查看器。
这是终端中的Visual Studio代码打印的内容:
PS G:\My Drive\repos\ttd> & "g:/My Drive/repos/ttd/ttdvenv/Scripts/Activate.ps1"
(ttdvenv) PS G:\My Drive\repos\ttd> & 'g:\My Drive\repos\ttd\ttdvenv\Scripts\python.exe' 'c:\Users\Gianmaria\.vscode\extensions\ms-python.python-2022.8.1\pythonFiles\lib\python\debugpy\launcher' '62264' '--' 'g:\My Drive\repos\ttd\test.py'
(ttdvenv) PS G:\My Drive\repos\ttd>
任何建议是问题吗? 谢谢你!
Windows 10, Python 3.10.5
This simple code
import abjad
n = abjad.Note("c'4")
abjad.show(n)
works flawlessly when I run it from the command line using py test.py
. It automatically launches my pdf viewer showing this:
But when I try to run it from Visual studio code it doesn't "work": it doesn't launch the pdf viewer.
This is what Visual studio code prints in the terminal:
PS G:\My Drive\repos\ttd> & "g:/My Drive/repos/ttd/ttdvenv/Scripts/Activate.ps1"
(ttdvenv) PS G:\My Drive\repos\ttd> & 'g:\My Drive\repos\ttd\ttdvenv\Scripts\python.exe' 'c:\Users\Gianmaria\.vscode\extensions\ms-python.python-2022.8.1\pythonFiles\lib\python\debugpy\launcher' '62264' '--' 'g:\My Drive\repos\ttd\test.py'
(ttdvenv) PS G:\My Drive\repos\ttd>
Any suggestion what can be the issue?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论