NutzCN Logo
问答 jar包管理,windows按照命令pip3 install psutil安装psutil模块
发布于 28天前 作者 wx_2jk6i7mpius707s625cs 140 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk

下面的步骤 nohup python server.py & 启动守护进程 为Linux 命令,如果想在windows部署服务管理jar包怎么去做?
我按照要求把需要的配置文件,和服务文件放在了一个文件夹下,并且修改settings.py文件中的第一个文件夹路径。
接下来怎么做用控制台输入 python server.py提示没有request不能引入

C:\Users\Administrator>e:

E:\wx\jars>python server.py
Traceback (most recent call last):
  File "server.py", line 16, in <module>
    from urllib import request, parse
ImportError: cannot import name request
8 回复

pip install request

from urllib import request, parse
>>> import urllib
>>> from urllib import request
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name request

urllib应该是python3

好的。明白了感谢

Exception in thread Thread-1:
Traceback (most recent call last):
  File "E:\wx\py3.5\lib\threading.py", line 914, in _bootstrap_inner
    self.run()
  File "server.py", line 160, in run
    subprocess.call(cmd, close_fds=True, shell=True, env=_env, stdout=f, stderr=
f)
  File "E:\wx\py3.5\lib\subprocess.py", line 247, in call
    with Popen(*popenargs, **kwargs) as p:
  File "E:\wx\py3.5\lib\subprocess.py", line 599, in __init__
    "close_fds is not supported on Windows platforms"
ValueError: close_fds is not supported on Windows platforms if you redirect stdi
n/stdout/stderr

Exception in thread Thread-2:
Traceback (most recent call last):
  File "E:\wx\py3.5\lib\threading.py", line 914, in _bootstrap_inner
    self.run()
  File "server.py", line 160, in run
    subprocess.call(cmd, close_fds=True, shell=True, env=_env, stdout=f, stderr=
f)
  File "E:\wx\py3.5\lib\subprocess.py", line 247, in call
    with Popen(*popenargs, **kwargs) as p:
  File "E:\wx\py3.5\lib\subprocess.py", line 599, in __init__
    "close_fds is not supported on Windows platforms"
ValueError: close_fds is not supported on Windows platforms if you redirect stdi
n/stdout/stderr

Exception in thread Thread-3:
Traceback (most recent call last):
  File "E:\wx\py3.5\lib\threading.py", line 914, in _bootstrap_inner
    self.run()
  File "server.py", line 160, in run
    subprocess.call(cmd, close_fds=True, shell=True, env=_env, stdout=f, stderr=
f)
  File "E:\wx\py3.5\lib\subprocess.py", line 247, in call
    with Popen(*popenargs, **kwargs) as p:
  File "E:\wx\py3.5\lib\subprocess.py", line 599, in __init__
    "close_fds is not supported on Windows platforms"
ValueError: close_fds is not supported on Windows platforms if you redirect stdi
n/stdout/stderr

Exception in thread Thread-4:
Traceback (most recent call last):
  File "E:\wx\py3.5\lib\threading.py", line 914, in _bootstrap_inner
    self.run()
  File "server.py", line 160, in run
    subprocess.call(cmd, close_fds=True, shell=True, env=_env, stdout=f, stderr=
f)
  File "E:\wx\py3.5\lib\subprocess.py", line 247, in call
    with Popen(*popenargs, **kwargs) as p:
  File "E:\wx\py3.5\lib\subprocess.py", line 599, in __init__
    "close_fds is not supported on Windows platforms"
ValueError: close_fds is not supported on Windows platforms if you redirect stdi
n/stdout/stderr

Exception in thread Thread-5:
Traceback (most recent call last):
  File "E:\wx\py3.5\lib\threading.py", line 914, in _bootstrap_inner
    self.run()
  File "server.py", line 160, in run
    subprocess.call(cmd, close_fds=True, shell=True, env=_env, stdout=f, stderr=
f)
  File "E:\wx\py3.5\lib\subprocess.py", line 247, in call
    with Popen(*popenargs, **kwargs) as p:
  File "E:\wx\py3.5\lib\subprocess.py", line 599, in __init__
    "close_fds is not supported on Windows platforms"
ValueError: close_fds is not supported on Windows platforms if you redirect stdi
n/stdout/stderr

Exception in thread Thread-6:
Traceback (most recent call last):
  File "E:\wx\py3.5\lib\threading.py", line 914, in _bootstrap_inner
    self.run()
  File "server.py", line 160, in run
    subprocess.call(cmd, close_fds=True, shell=True, env=_env, stdout=f, stderr=
f)
  File "E:\wx\py3.5\lib\subprocess.py", line 247, in call
    with Popen(*popenargs, **kwargs) as p:
  File "E:\wx\py3.5\lib\subprocess.py", line 599, in __init__
    "close_fds is not supported on Windows platforms"
ValueError: close_fds is not supported on Windows platforms if you redirect stdi
n/stdout/stderr

Python 3.x 最新版是 Python 3.7.3,不能去官网下么?不知道都是哪里下的安装包

添加回复
请先登陆
回到顶部