2024-04-27 05:57:46 发布
网友
我正在尝试使用SunnyPy。我对python比较陌生,不了解自述文件中的第2步:
PYTHONPATH=. ./bin/sunnyportal2pvoutput --dry-run sunnyportal.config
有人能帮我吗?我已进入下载文件夹中的cmd.exe,我不知道如何在正确位置正确写入python路径。我应该将什么粘贴到命令行中?谢谢
编辑:我想能够在Windows上这样做,请告诉我这是否可行
bullet 2中的命令将在命令行中键入(您需要在windows:cmd或powershell、Linux:bash等中才能执行此操作)
PYTHONPATH=. ./bin/sunnyportal2pvoutput dry-run sunnyportal.config
上面命令代码的第一部分指示程序的位置。通过命令行(windows:cd:…;其中..是您的文件夹名)转到特定文件夹并键入命令
第二部分是要执行的命令。在“破折号”后面。程序知道该做什么。在这种情况下:
dry-run sunnyportal.config
运行验证/配置文件,查看程序代码本身是否工作;如“干运行”所示
在您的案例中,在位置键入(在cmd中):
"sunnyportal2pvoutput dry-run sunnyportal.config"
或
"sunnyportal2pvoutput.py dry-run sunnyportal.config" (without the environment variables (python path) set).
注意:pythonpath是一个环境变量。可通过以下方式添加:控制面板\所有控制面板项目\系统\>;bullet高级系统设置>;按钮“环境变量”。然后,您可以选择将其添加到“用户用户名变量”或“系统变量”中。请记住此后重新启动以使更改立即生效
更新1(pip安装sunnyportal):
结果:
Microsoft Windows [Version 10.0.18363.836] (c) 2019 Microsoft Corporation. All rights reserved. C:\Windows\System32>pip search sunnyportalsunnyportal-py (0.0.4) - A Python client for SMA sunny portalC:\Windows\System32>
Microsoft Windows [Version 10.0.18363.836] (c) 2019 Microsoft Corporation. All rights reserved. C:\Windows\System32>pip search sunnyportal
sunnyportal-py (0.0.4) - A Python client for SMA sunny portal
C:\Windows\System32>
如果找到,则键入:
“pip安装sunnyportal”
bullet 2中的命令将在命令行中键入(您需要在windows:cmd或powershell、Linux:bash等中才能执行此操作)
上面命令代码的第一部分指示程序的位置。通过命令行(windows:cd:…;其中..是您的文件夹名)转到特定文件夹并键入命令
第二部分是要执行的命令。在“破折号”后面。程序知道该做什么。在这种情况下:
运行验证/配置文件,查看程序代码本身是否工作;如“干运行”所示
在您的案例中,在位置键入(在cmd中):
或
注意:pythonpath是一个环境变量。可通过以下方式添加:控制面板\所有控制面板项目\系统\>;bullet高级系统设置>;按钮“环境变量”。然后,您可以选择将其添加到“用户用户名变量”或“系统变量”中。请记住此后重新启动以使更改立即生效
更新1(pip安装sunnyportal):
结果:
如果找到,则键入:
“pip安装sunnyportal”
相关问题 更多 >
编程相关推荐