如何将.py转换为.exe? Pyinstaller不起作用

时间:2020-10-21 12:22:14

标签: python pip pyinstaller

pip install pyinstaller


pyinstaller app.py

enter image description here] 1

所以它告诉我pyinstaller找不到。但是我已经下载了pyinstaller。 我不知道为什么?

1 个答案:

答案 0 :(得分:1)

您需要将const _makeMove = async (activePlayer) => { try { //Step 1 - take input const proposedMove = await activePlayer.proposeMove(); //Step 2 - check if legal if (!gameBoard.checkLegal(proposedMove)) { throw new Error("bad entry"); } //Step 3 - etc //Step 4 - etc //Step 5 - etc } catch (e) { console.log('oops bad entry!') console.log("how it works: type 2 numbers ONLY, each between 1 and 3 (no spaces), to signify your move") console.log("eg to place a mark into bottom left corner type 33. First cell = 11. Bang in the center = 22. You get it.") console.log('lets try again...') return _makeMove(activePlayer); } }; 添加到PATH环境变量中。

  • 在安装时,选中将python添加到Path。
  • 首先找到pyinstaller.exe的路径,该路径通常在python安装目录的Scripts目录中。然后复制文件路径并从Cmd运行library(shiny) library(DT) library(base64enc) ui <- fluidPage( tags$head( tags$script(src = "https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"), tags$script(src = "https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js") ), br(), DTOutput("dtable") ) server <- function(input, output, session){ output[["dtable"]] <- renderDT({ datatable( iris[1:5,], extensions = "Buttons", options = list( dom = "Bfrtip", buttons = list( list( extend = "pdfHtml5", customize = JS( "function(doc) {", " doc.content.splice( 1, 0, {", " margin: [ 0, 0, 0, 12 ],", " alignment: 'center',", sprintf( " image: '%s',", dataURI( file = "https://www.r-project.org/logo/Rlogo.png", mime = "image/png" ) ), " width: 50", " })", "}" ) ) ) ) ) }) } shinyApp(ui, server)