Kitware / web-project-templates

This repository try to gather various web project templates based on vue, vtk.js, paraviewweb...
26 stars 10 forks source link

What to do to be able to use the pvpython command? #16

Closed RQsky closed 3 years ago

RQsky commented 3 years ago

Hello, I tried to run this command /.../pvpython ./server/pvpython/pvw-server.py --content ./dist --port 1234. But pvpython is not recognized by the command line. So I installed the paraview client and successfully set the environment variables, but it didn't work. Then I set the python interpreter of the editor (vscode) to pvpython.exe, which didn't work either. Can you tell me what other methods I can use?

jourdain commented 3 years ago

What do you mean by "successfully set the environment variables"?

What command line did you actually run on Windows? In which shell?

Did you build the web client first so ./dist actually exist?

RQsky commented 3 years ago

My order of operation is, first use git clone to download the project; Then use npm install Then npm run server Then the client part should be complete. Then use /.../pvpython ./server/pvpython/pvw-server.py --port 1234, an error will be thrown: "/.../pvpython" cannot be recognized as a cmdlet, function, script file or The name of the executable program. So I tried some solutions. Before that, paraview was not installed on my computer, so I installed it and set the environment variables. Environment variables mean PATH and PYTHONPATH, I refer to https://kitware.github.io/paraview-docs/latest/python/quick-start.html#getting-started; This didn't work, so I set the editor's interpreter to pvpython.exe, and it didn't work. So I want to ask you! Thank you I haven't learned about vtk and paraview before this.

RQsky commented 3 years ago

The problem is solved, thank you. My above method is effective. I found that the terminal of vscode is not running code like cmd of windows. Your code pvpython… can run successfully in cmd. In vscode, it is "& + path of pvpython.exe + pvw-server.py + --port 1234"