windows 7 64 位上的 streamlit 安装错误

streamlit installation error on windows 7 64 bit

我 运行 pip install streamlit 并成功安装了 streamlit。

但是,当我 运行 streamlit hellostreamlit run app.py 其中 app.py 是一个 python 应用程序而我 import streamlit,我得到以下错误。

$ streamlit hello
Traceback (most recent call last):
  File "c:\program files (x86)\python37-32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\program files (x86)\python37-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Program Files (x86)\Python37-32\Scripts\streamlit.exe\__main__.py", line 7, in <module>
  File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 717, in main
    rv = self.invoke(ctx)
  File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\program files (x86)\python37-32\lib\site-packages\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "c:\program files (x86)\python37-32\lib\site-packages\streamlit\cli.py", line 192, in main_hello
    _main_run(filename)
  File "c:\program files (x86)\python37-32\lib\site-packages\streamlit\cli.py", line 251, in _main_run
    bootstrap.run(file, command_line, args)
  File "c:\program files (x86)\python37-32\lib\site-packages\streamlit\bootstrap.py", line 221, in run
    server.start(_on_server_start)
  File "c:\program files (x86)\python37-32\lib\site-packages\streamlit\server\Server.py", line 213, in start
    start_listening(app)
  File "c:\program files (x86)\python37-32\lib\site-packages\streamlit\server\Server.py", line 122, in start_listening
    app.listen(port)
  File "c:\program files (x86)\python37-32\lib\site-packages\tornado\web.py", line 2042, in listen
    server.listen(port, address)
  File "c:\program files (x86)\python37-32\lib\site-packages\tornado\tcpserver.py", line 143, in listen
    sockets = bind_sockets(port, address=address)
  File "c:\program files (x86)\python37-32\lib\site-packages\tornado\netutil.py", line 168, in bind_sockets
    sock.bind(sockaddr)
OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions

我已尝试禁用防火墙,但错误仍然存​​在。我也试过 运行ning streamlit run app.py --browser.serverPort 3000 但仍然有同样的错误。

我认为选项不是--browser.serverPort而是--server.port:

streamlit run your_script.py --server.port 3000