SkyChat|Windows安装教程

本文主要介绍如何本地化部署SkyChat模型,是由昆仑万维所公开的开源AIGC全系列算法与模型,“昆仑天工”旗下模型包括天工巧汇、天工乐府、天工妙笔、天工智码,涵盖图像、音乐、文本、编程等多模态内容。

安装教程

在阅读本文之前,请您对Conda和CMD有基础的了解,如果您不太了解这两项,可以通过阅读本站所写的Conda和CMD的相关基础知识,然后再参阅以下内容来搭建SkyChat

CMD教程

CMD
主要了解CMD如何打开,如何运行命令即可。

Conda教程

学习Conda可以任选其一,本教程的命令都是能用的。

下载地址

Github

https://github.com/SkyWorkAIGC/SkyChat

网盘下载

最便捷的方法,使用本站提供的安装包,其中包括了模型与Github源代码,您下载后,直接将openAI文件夹解压至电脑的D盘,然后根据下面的教程直接复制粘贴命令即可,免去修改成自定义路径的麻烦。

备注:解压后的正确路径应该为:D:\openAI\SkyChat\

如果您将压至其它目录,或者更改了文件夹的名字,那请您在使用如下教程时,切记修改自己相对应的路径,不然将会报错。

SkyChat

提取密码 文件说明 文件大小 1.7GB 文件格式 RAR 资源价格 免费 下载次数 0

更新基础环境

在开始使用Conda创建环境之前,我们应该先更新Conda的基础环境依赖,使其保持最新。

打开CMD,输入以下命令,Conda基础环境将会得到自动更新。

conda update -n base -c defaults conda

您将会看到如下提示:

Proceed ([y]/n)?

我们直接按下回车即可更新全部基础依赖至最新啦。

Semantic

创建Semantic环境

下面我们开始创建一个空环境

conda create -n semantic

同样会看到Proceed ([y]/n)?的提示,我们直接按回车即可。

验证环境

输入如下命令,查看名为semantic的Conda环境是否创建成功。

conda info --envs

我们将会看到如下反馈:

D:\openAI\SkyChat>conda info --envs
# conda environments:
#
semantic                 C:\Users\openAI\.conda\envs\semantic
base                  *  C:\openAI\Miniconda3

可以看到环境已经创建好了。

激活semantic环境

我们激活刚刚创建的环境。

conda activate semantic

semantic环境安装PIP

重要:在激活环境之后,我们一定要先为该环境安装PIP,不然Conda将会调用Base内的PIP安装至默认的Base环境,而不是已经激活了的环境。

conda install pip

卸载Numpy

注意:如果您是Miniconda可以跳过该步骤,如果您是Anaconda,执行如下命令,该命令用来删掉初始自带的numpy:

python -m pip uninstall numpy

跳转路径

通过CD跳转至您的SkyChat路径,命令如下:

cd /d D:\openAI\SkyChat\semantic_score_clean

安装环境依赖

执行如下命令,自动安装semantic的相关依赖库。

pip install -r requirements.txt

启动Semantic服务

安装完成后,执行如下命令:

python semantic_score_api.py

至此,Semantic的相关环境已经搭建完成,请保持该CMD窗口运行,不要关闭。

安装CUDA

关于CUDA的安装,请参考下面这篇文章。

userprofile

创建userprofile环境

通过如下代码来创建一个名称为userprofile的空环境:

conda create -n userprofile

同样会看到Proceed ([y]/n)?的提示,我们直接按回车即可。

验证环境

输入如下命令,查看名为userprofile的Conda环境是否创建成功。

conda info --envs

我们将会看到如下反馈:

D:\openAI\SkyChat>conda info --envs
# conda environments:
#
semantic                 C:\Users\openAI\.conda\envs\semantic
userprofile              C:\Users\openAI\.conda\envs\userprofile
base                  *  C:\openAI\Miniconda3

可以看到环境已经创建好了。

激活semantic环境

我们激活刚刚创建的环境。

conda activate userprofile

userprofile环境安装PIP

重要:在激活环境之后,我们一定要先为该环境安装PIP,不然Conda将会调用Base内的PIP安装至默认的Base环境,而不是已经激活了的环境。

conda install pip

卸载Numpy

注意:如果您是Miniconda可以跳过该步骤,如果您是Anaconda,执行如下命令,该命令用来删掉初始自带的numpy:

python -m pip uninstall numpy

跳转路径

通过CD跳转至您的SkyChat路径,命令如下:

cd /d D:\openAI\SkyChat\userprofile

安装环境依赖

执行如下命令,自动安装userprofile的相关依赖库:

pip install -r requirements.txt

安装Cuda版Torch

python -m pip install torch==1.11.0+cu115 -f https://download.pytorch.org/whl/torch_stable.html

安装补充

本站在安装部署测试时发现,运行服务后,可能提示如下依赖的缺失,可以尝试输入以下命令安装相应依赖。

安装Flask

pip install flask

安装Numpy

pip install Numpy==1.16.4

安装FastNLP

pip install fastNLP==0.5.0

启动userprofile服务

安装完成后,执行如下命令:

python server_v3.py

至此,userprofile项目相关安装完成。

启动SkyChat

在本地浏览器打开http://192.168.0.106:8001,即可访问SkyChat聊天机器人服务啦。

此文章由OpenAI开源维基百科原创发布,如若转载请注明出处:https://openai.wiki/skychat-windows-install.html

(0)
上一篇 2022-12-19 15:43
下一篇 2022-12-20 00:17

相关推荐

  • ChatALL|语言模型集合

    ChatALL(中文名:齐叨)可以把一条指令同时发给多个AI,帮助您发现最优回答。目前支持ChatGPT|NewBing|文心一言|Bard|通义千问|ChatGML|讯飞星火|Moss及POE之类。

    2023-06-09
    053.2K
  • SkyChat

    SkyChat是由昆仑万维所公开的开源AIGC全系列算法与模型,“昆仑天工”旗下模型包括天工巧汇、天工乐府SkyMusic、天工妙笔、天工智码SkyCode,涵盖图像、音乐、文本、编程等多模态内容。

    其它模型 2022-12-20
    022.0K
  • GPT4All-UI|对话机器人

    基于Flask Web应用程序的聊天界面,可与基于llamacpp的聊天机器人(如GPT4all、vicuna等)进行交互。使用Nomic-AI高级库与GPT4all模型进行通信,确保无缝高效的通信。

    2023-04-16
    032.9K
  • ChatGLM-6B|开源本地化语言模型

    ChatGLM-6B是一种开源的、支持中英双语的对话语言模型,具有62亿参数。它使用了GLM架构和量化技术,可在消费级显卡上进行本地部署。该模型为清华开源模型,效果堪比ChatGPT。

    2023-04-01
    0647.9K
  • ChatYuan|开源本地化语言模型

    ChatYuan-large-v2是一个轻量化的、支持中英双语的功能型对话语言大模型,是ChatYuan系列的最新开源模型,增强了模型的基础能力和数学运算能力,新增了拒答、代码生成和表格生成等新功能。

    2023-04-01
    042.4K

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

评论列表(58条)

  • jk
    jk 2023-03-01 20:32

    pip install -r requirements.txt安装失败
    Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
    Processing c:\b\abs_85o_6fm0se\croot\certifi_1671487778835\work\certifi
    ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: ‘C:\\b\\abs_85o_6fm0se\\croot\\certifi_1671487778835\\work\\certifi’
    使用清华源也不行

    • PhiltreX
      PhiltreX 2023-03-01 21:13

      @jk你这是路径写错了吧,好像和源没啥关系呢。
      No such file or directory是指没有找到路径。

  • Booth
    Booth 2023-03-16 12:08

    cd /d D:\openAI\SkyChat\userprofile 是输入之后,它提示找不到路径,这是怎么回事

    • Booth
      Booth 2023-03-16 12:09

      @Booth之前的每一步都是按照文章指引来的

    • Booth
      Booth 2023-03-16 14:04

      @BoothC:\Users\openAI\.conda\envs\userprofile,userprofile这个东西不是在这里吗?怎么要去skychat下面找?为什么?

    • PhiltreX
      PhiltreX 2023-03-16 12:11

      @Booth您是不是改路径了?如果你的路径和我的不一样,是需要成和自己匹配的呢。

  • Booth
    Booth 2023-03-16 18:22

    cd /d D:\openAI\SkyChat\semantic_score_clean 刚刚试了一下,发现连跳转到这个地址都不行了!为什么?

    • PhiltreX
      PhiltreX 2023-03-16 19:27

      @Booth那证明你的电脑D:\openAI\SkyChat\semantic_score_clean这个路径里面没东西呀。

    • Booth
      Booth 2023-03-16 20:54

      @PhiltreX是的,里面没有

    • Booth
      Booth 2023-03-17 08:58

      @PhiltreXD:Tool\openAI\SkyChat里没有userprofile这个文件夹,这个文件在 D:\Tool\Anaconda\envs\userprofile,可是我在接下来的步骤中,跳转到这里,进行下面的操作,pip install -r requirements.txt,它提示 ERROR: Could not open requirements file: [Errno 2] No such file or directory: ‘requirements.txt’

    • PhiltreX
      PhiltreX 2023-03-17 12:47

      @Booth这证明您git clone的时候,可能没有git完整,导致requirements.txt文件没有被拉取,建议全部删除重来。

    • Booth
      Booth 2023-03-17 17:31

      @PhiltreX这证明您git clone的时候,可能没有git完整,导致requirements.txt文件没有被拉取,建议全部删除重来

      您说这个话,我有两个问题,第一,如何git clone是指什么意思,保障下一次可以办到?第二,如何完整点删除已经安装的那些东西?

  • Booth
    Booth 2023-03-16 18:34

    Microsoft Windows [版本 10.0.22621.1265]
    (c) Microsoft Corporation。保留所有权利。

    C:\Users\ZPTAO>conda update -n base -c defaults conda
    Collecting package metadata (current_repodata.json): done
    Solving environment: done

    ## Package Plan ##

    environment location: D:\Tool\Anaconda

    added / updated specs:
    – conda

    The following packages will be downloaded:

    package | build
    —————————|—————–
    conda-23.1.0 | py39haa95532_0 946 KB
    conda-package-handling-2.0.2| py39haa95532_0 286 KB
    conda-package-streaming-0.7.0| py39haa95532_0 27 KB
    conda-repo-cli-1.0.27 | py39haa95532_0 130 KB
    ruamel.yaml-0.17.21 | py39h2bbff1b_0 174 KB
    ruamel.yaml.clib-0.2.6 | py39h2bbff1b_1 101 KB
    zstandard-0.19.0 | py39h2bbff1b_0 340 KB
    ————————————————————
    Total: 2.0 MB

    The following NEW packages will be INSTALLED:

    conda-package-str~ pkgs/main/win-64::conda-package-streaming-0.7.0-py39haa95532_0 None
    ruamel.yaml pkgs/main/win-64::ruamel.yaml-0.17.21-py39h2bbff1b_0 None
    ruamel.yaml.clib pkgs/main/win-64::ruamel.yaml.clib-0.2.6-py39h2bbff1b_1 None
    zstandard pkgs/main/win-64::zstandard-0.19.0-py39h2bbff1b_0 None

    The following packages will be UPDATED:

    conda 22.9.0-py39haa95532_0 –> 23.1.0-py39haa95532_0 None
    conda-package-han~ 1.9.0-py39h8cc25b3_0 –> 2.0.2-py39haa95532_0 None
    conda-repo-cli 1.0.20-py39haa95532_0 –> 1.0.27-py39haa95532_0 None

    Proceed ([y]/n)?

    Downloading and Extracting Packages
    conda-repo-cli-1.0.2 | 130 KB | ############################################################################ | 100%
    conda-23.1.0 | 946 KB | ############################################################################ | 100%
    ruamel.yaml.clib-0.2 | 101 KB | ############################################################################ | 100%
    ruamel.yaml-0.17.21 | 174 KB | ############################################################################ | 100%
    conda-package-stream | 27 KB | ############################################################################ | 100%
    zstandard-0.19.0 | 340 KB | ############################################################################ | 100%
    conda-package-handli | 286 KB | ############################################################################ | 100%
    Preparing transaction: done
    Verifying transaction: done
    Executing transaction: done
    Retrieving notices: …working… done

    C:\Users\ZPTAO>conda create -n semantic
    Collecting package metadata (current_repodata.json): done
    Solving environment: done

    ## Package Plan ##

    environment location: D:\Tool\Anaconda\envs\semantic

    Proceed ([y]/n)?

    Preparing transaction: done
    Verifying transaction: done
    Executing transaction: done
    #
    # To activate this environment, use
    #
    # $ conda activate semantic
    #
    # To deactivate an active environment, use
    #
    # $ conda deactivate

    C:\Users\ZPTAO>conda info –envs
    # conda environments:
    #
    base D:\Tool\Anaconda
    semantic D:\Tool\Anaconda\envs\semantic

    C:\Users\ZPTAO>conda activate semantic

    (semantic) C:\Users\ZPTAO>conda install pip
    Collecting package metadata (current_repodata.json): done
    Solving environment: done

    ## Package Plan ##

    environment location: D:\Tool\Anaconda\envs\semantic

    added / updated specs:
    – pip

    The following packages will be downloaded:

    package | build
    —————————|—————–
    ca-certificates-2023.01.10 | haa95532_0 121 KB
    certifi-2022.12.7 | py310haa95532_0 149 KB
    libffi-3.4.2 | hd77b12b_6 109 KB
    openssl-1.1.1t | h2bbff1b_0 5.5 MB
    pip-23.0.1 | py310haa95532_0 2.8 MB
    python-3.10.9 | h966fe2a_2 15.8 MB
    setuptools-65.6.3 | py310haa95532_0 1.2 MB
    sqlite-3.41.1 | h2bbff1b_0 897 KB
    tzdata-2022g | h04d1e81_0 114 KB
    wheel-0.38.4 | py310haa95532_0 83 KB
    wincertstore-0.2 | py310haa95532_2 15 KB
    xz-5.2.10 | h8cc25b3_1 520 KB
    zlib-1.2.13 | h8cc25b3_0 113 KB
    ————————————————————
    Total: 27.3 MB

    The following NEW packages will be INSTALLED:

    bzip2 pkgs/main/win-64::bzip2-1.0.8-he774522_0
    ca-certificates pkgs/main/win-64::ca-certificates-2023.01.10-haa95532_0
    certifi pkgs/main/win-64::certifi-2022.12.7-py310haa95532_0
    libffi pkgs/main/win-64::libffi-3.4.2-hd77b12b_6
    openssl pkgs/main/win-64::openssl-1.1.1t-h2bbff1b_0
    pip pkgs/main/win-64::pip-23.0.1-py310haa95532_0
    python pkgs/main/win-64::python-3.10.9-h966fe2a_2
    setuptools pkgs/main/win-64::setuptools-65.6.3-py310haa95532_0
    sqlite pkgs/main/win-64::sqlite-3.41.1-h2bbff1b_0
    tk pkgs/main/win-64::tk-8.6.12-h2bbff1b_0
    tzdata pkgs/main/noarch::tzdata-2022g-h04d1e81_0
    vc pkgs/main/win-64::vc-14.2-h21ff451_1
    vs2015_runtime pkgs/main/win-64::vs2015_runtime-14.27.29016-h5e58377_2
    wheel pkgs/main/win-64::wheel-0.38.4-py310haa95532_0
    wincertstore pkgs/main/win-64::wincertstore-0.2-py310haa95532_2
    xz pkgs/main/win-64::xz-5.2.10-h8cc25b3_1
    zlib pkgs/main/win-64::zlib-1.2.13-h8cc25b3_0

    Proceed ([y]/n)?

    Downloading and Extracting Packages

    Preparing transaction: done
    Verifying transaction: done
    Executing transaction: done

    (semantic) C:\Users\ZPTAO>python -m pip uninstall numpy
    WARNING: Skipping numpy as it is not installed.

    (semantic) C:\Users\ZPTAO>cd /d D:\Tool\openAI\SkyChat\semantic_score_clean

    (semantic) D:\Tool\openAI\Skychat\semantic_score_clean>pip install -r requirements.txt
    Collecting transformers
    Downloading transformers-4.27.0-py3-none-any.whl (6.8 MB)
    ━━━━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/6.8 MB 8.9 kB/s eta 0:08:47
    ERROR: Exception:
    Traceback (most recent call last):
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_vendor\urllib3\response.py”, line 438, in _error_catcher
    yield
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_vendor\urllib3\response.py”, line 561, in read
    data = self._fp_read(amt) if not fp_closed else b””
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_vendor\urllib3\response.py”, line 527, in _fp_read
    return self._fp.read(amt) if amt is not None else self._fp.read()
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py”, line 90, in read
    data = self.__fp.read(amt)
    File “D:\Tool\Anaconda\envs\semantic\lib\http\client.py”, line 465, in read
    s = self.fp.read(amt)
    File “D:\Tool\Anaconda\envs\semantic\lib\socket.py”, line 705, in readinto
    return self._sock.recv_into(b)
    File “D:\Tool\Anaconda\envs\semantic\lib\ssl.py”, line 1274, in recv_into
    return self.read(nbytes, buffer)
    File “D:\Tool\Anaconda\envs\semantic\lib\ssl.py”, line 1130, in read
    return self._sslobj.read(len, buffer)
    TimeoutError: The read operation timed out

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_internal\cli\base_command.py”, line 160, in exc_logging_wrapper
    status = run_func(*args)
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_internal\cli\req_command.py”, line 247, in wrapper
    return func(self, options, args)
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_internal\commands\install.py”, line 419, in run
    requirement_set = resolver.resolve(
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py”, line 92, in resolve
    result = self._result = resolver.resolve(
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_vendor\resolvelib\resolvers.py”, line 481, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_vendor\resolvelib\resolvers.py”, line 348, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_vendor\resolvelib\resolvers.py”, line 172, in _add_to_criteria
    if not criterion.candidates:
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_vendor\resolvelib\structs.py”, line 151, in __bool__
    return bool(self._sequence)
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py”, line 155, in __bool__
    return any(self)
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py”, line 143, in
    return (c for c in iterator if id(c) not in self._incompatible_ids)
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py”, line 47, in _iter_built
    candidate = func()
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py”, line 206, in _make_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py”, line 297, in __init__
    super().__init__(
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py”, line 162, in __init__
    self.dist = self._prepare()
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py”, line 231, in _prepare
    dist = self._prepare_distribution()
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py”, line 308, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_internal\operations\prepare.py”, line 491, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_internal\operations\prepare.py”, line 536, in _prepare_linked_requirement
    local_file = unpack_url(
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_internal\operations\prepare.py”, line 166, in unpack_url
    file = get_http_url(
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_internal\operations\prepare.py”, line 107, in get_http_url
    from_path, content_type = download(link, temp_dir.path)
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_internal\network\download.py”, line 147, in __call__
    for chunk in chunks:
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_internal\cli\progress_bars.py”, line 53, in _rich_progress_bar
    for chunk in iterable:
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_internal\network\utils.py”, line 63, in response_chunks
    for chunk in response.raw.stream(
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_vendor\urllib3\response.py”, line 622, in stream
    data = self.read(amt=amt, decode_content=decode_content)
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_vendor\urllib3\response.py”, line 560, in read
    with self._error_catcher():
    File “D:\Tool\Anaconda\envs\semantic\lib\contextlib.py”, line 153, in __exit__
    self.gen.throw(typ, value, traceback)
    File “D:\Tool\Anaconda\envs\semantic\lib\site-packages\pip\_vendor\urllib3\response.py”, line 443, in _error_catcher
    raise ReadTimeoutError(self._pool, None, “Read timed out.”)
    pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=’files.pythonhosted.org’, port=443): Read timed out.

    (semantic) D:\Tool\openAI\Skychat\semantic_score_clean>pip install -r requirements.txt
    Collecting transformers
    Downloading transformers-4.27.1-py3-none-any.whl (6.7 MB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.7/6.7 MB 201.3 kB/s eta 0:00:00
    Collecting flask
    Downloading Flask-2.2.3-py3-none-any.whl (101 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 101.8/101.8 kB 1.5 MB/s eta 0:00:00
    Collecting torch
    Downloading torch-2.0.0-cp310-cp310-win_amd64.whl (172.3 MB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 172.3/172.3 MB 6.8 MB/s eta 0:00:00
    Collecting filelock
    Downloading filelock-3.10.0-py3-none-any.whl (9.9 kB)
    Collecting huggingface-hub=0.11.0
    Downloading huggingface_hub-0.13.2-py3-none-any.whl (199 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 199.2/199.2 kB 6.1 MB/s eta 0:00:00
    Collecting packaging>=20.0
    Downloading packaging-23.0-py3-none-any.whl (42 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.7/42.7 kB 2.0 MB/s eta 0:00:00
    Collecting tqdm>=4.27
    Downloading tqdm-4.65.0-py3-none-any.whl (77 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.1/77.1 kB ? eta 0:00:00
    Collecting tokenizers!=0.11.3,=0.11.1
    Downloading tokenizers-0.13.2-cp310-cp310-win_amd64.whl (3.3 MB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 7.0 MB/s eta 0:00:00
    Collecting numpy>=1.17
    Downloading numpy-1.24.2-cp310-cp310-win_amd64.whl (14.8 MB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.8/14.8 MB 5.5 MB/s eta 0:00:00
    Collecting regex!=2019.12.17
    Downloading regex-2022.10.31-cp310-cp310-win_amd64.whl (267 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 267.7/267.7 kB 4.2 MB/s eta 0:00:00
    Collecting pyyaml>=5.1
    Downloading PyYAML-6.0-cp310-cp310-win_amd64.whl (151 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 151.7/151.7 kB 4.6 MB/s eta 0:00:00
    Collecting requests
    Downloading requests-2.28.2-py3-none-any.whl (62 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.8/62.8 kB 3.3 MB/s eta 0:00:00
    Collecting click>=8.0
    Downloading click-8.1.3-py3-none-any.whl (96 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.6/96.6 kB 5.4 MB/s eta 0:00:00
    Collecting Werkzeug>=2.2.2
    Downloading Werkzeug-2.2.3-py3-none-any.whl (233 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 233.6/233.6 kB 4.8 MB/s eta 0:00:00
    Collecting Jinja2>=3.0
    Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 kB 7.7 MB/s eta 0:00:00
    Collecting itsdangerous>=2.0
    Downloading itsdangerous-2.1.2-py3-none-any.whl (15 kB)
    Collecting networkx
    Downloading networkx-3.0-py3-none-any.whl (2.0 MB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 4.8 MB/s eta 0:00:00
    Collecting typing-extensions
    Downloading typing_extensions-4.5.0-py3-none-any.whl (27 kB)
    Collecting sympy
    Downloading sympy-1.11.1-py3-none-any.whl (6.5 MB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.5/6.5 MB 5.2 MB/s eta 0:00:00
    Collecting colorama
    Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)
    Collecting MarkupSafe>=2.0
    Downloading MarkupSafe-2.1.2-cp310-cp310-win_amd64.whl (16 kB)
    Collecting idna=2.5
    Downloading idna-3.4-py3-none-any.whl (61 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.5/61.5 kB ? eta 0:00:00
    Requirement already satisfied: certifi>=2017.4.17 in d:\tool\anaconda\envs\semantic\lib\site-packages (from requests->transformers->-r requirements.txt (line 1)) (2022.12.7)
    Collecting charset-normalizer=2
    Downloading charset_normalizer-3.1.0-cp310-cp310-win_amd64.whl (97 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.1/97.1 kB 5.4 MB/s eta 0:00:00
    Collecting urllib3=1.21.1
    Downloading urllib3-1.26.15-py2.py3-none-any.whl (140 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 140.9/140.9 kB 2.8 MB/s eta 0:00:00
    Collecting mpmath>=0.19
    Downloading mpmath-1.3.0-py3-none-any.whl (536 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 536.2/536.2 kB 6.7 MB/s eta 0:00:00
    Installing collected packages: tokenizers, mpmath, urllib3, typing-extensions, sympy, regex, pyyaml, packaging, numpy, networkx, MarkupSafe, itsdangerous, idna, filelock, colorama, charset-normalizer, Werkzeug, tqdm, requests, Jinja2, click, torch, huggingface-hub, flask, transformers
    Successfully installed Jinja2-3.1.2 MarkupSafe-2.1.2 Werkzeug-2.2.3 charset-normalizer-3.1.0 click-8.1.3 colorama-0.4.6 filelock-3.10.0 flask-2.2.3 huggingface-hub-0.13.2 idna-3.4 itsdangerous-2.1.2 mpmath-1.3.0 networkx-3.0 numpy-1.24.2 packaging-23.0 pyyaml-6.0 regex-2022.10.31 requests-2.28.2 sympy-1.11.1 tokenizers-0.13.2 torch-2.0.0 tqdm-4.65.0 transformers-4.27.1 typing-extensions-4.5.0 urllib3-1.26.15

    (semantic) D:\Tool\openAI\Skychat\semantic_score_clean>python semantic_score_api.py
    load ./models/lr5e-06_batch256_epoch10_bs1_finetune3_half/
    default threshold 0.95
    ————————————————————————————————————————
    Starting Python Flask Server For Semantic Score…
    start service : Thu, 16 Mar 2023 00:57:45 +0000
    * Serving Flask app ‘semantic_score_api’
    * Debug mode: off
    WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
    * Running on all addresses (0.0.0.0)
    * Running on http://127.0.0.1:8000
    * Running on http://10.93.192.189:8000
    Press CTRL+C to quit

    (semantic) D:\Tool\openAI\Skychat\semantic_score_clean>
    (semantic) D:\Tool\openAI\Skychat\semantic_score_clean>conda create -n userprofile
    Collecting package metadata (current_repodata.json): done
    Solving environment: done

    ## Package Plan ##

    environment location: D:\Tool\Anaconda\envs\userprofile

    Proceed ([y]/n)?

    Preparing transaction: done
    Verifying transaction: done
    Executing transaction: done
    #
    # To activate this environment, use
    #
    # $ conda activate userprofile
    #
    # To deactivate an active environment, use
    #
    # $ conda deactivate

    (semantic) D:\Tool\openAI\Skychat\semantic_score_clean>conda info –envs
    # conda environments:
    #
    base D:\Tool\Anaconda
    semantic * D:\Tool\Anaconda\envs\semantic
    userprofile D:\Tool\Anaconda\envs\userprofile

    (semantic) D:\Tool\openAI\Skychat\semantic_score_clean>conda activate userprofile

    (userprofile) D:\Tool\openAI\Skychat\semantic_score_clean>conda install pip
    Collecting package metadata (current_repodata.json): done
    Solving environment: done

    ## Package Plan ##

    environment location: D:\Tool\Anaconda\envs\userprofile

    added / updated specs:
    – pip

    The following NEW packages will be INSTALLED:

    bzip2 pkgs/main/win-64::bzip2-1.0.8-he774522_0
    ca-certificates pkgs/main/win-64::ca-certificates-2023.01.10-haa95532_0
    certifi pkgs/main/win-64::certifi-2022.12.7-py310haa95532_0
    libffi pkgs/main/win-64::libffi-3.4.2-hd77b12b_6
    openssl pkgs/main/win-64::openssl-1.1.1t-h2bbff1b_0
    pip pkgs/main/win-64::pip-23.0.1-py310haa95532_0
    python pkgs/main/win-64::python-3.10.9-h966fe2a_2
    setuptools pkgs/main/win-64::setuptools-65.6.3-py310haa95532_0
    sqlite pkgs/main/win-64::sqlite-3.41.1-h2bbff1b_0
    tk pkgs/main/win-64::tk-8.6.12-h2bbff1b_0
    tzdata pkgs/main/noarch::tzdata-2022g-h04d1e81_0
    vc pkgs/main/win-64::vc-14.2-h21ff451_1
    vs2015_runtime pkgs/main/win-64::vs2015_runtime-14.27.29016-h5e58377_2
    wheel pkgs/main/win-64::wheel-0.38.4-py310haa95532_0
    wincertstore pkgs/main/win-64::wincertstore-0.2-py310haa95532_2
    xz pkgs/main/win-64::xz-5.2.10-h8cc25b3_1
    zlib pkgs/main/win-64::zlib-1.2.13-h8cc25b3_0

    Proceed ([y]/n)?

    Downloading and Extracting Packages

    Preparing transaction: done
    Verifying transaction: done
    Executing transaction: done

    (userprofile) D:\Tool\openAI\Skychat\semantic_score_clean>python -m pip uninstall numpy
    WARNING: Skipping numpy as it is not installed.

    (userprofile) D:\Tool\openAI\Skychat\semantic_score_clean>cd /d D:\openAI\SkyChat\userprofile
    系统找不到指定的路径。

    (userprofile) D:\Tool\openAI\Skychat\semantic_score_clean>cd /d D:Tool\openAI\SkyChat\userprofile
    系统找不到指定的路径。

    (userprofile) D:\Tool\openAI\Skychat\semantic_score_clean> cd /d D:Tool\openAI\SkyChat\userprofile
    系统找不到指定的路径。

    (userprofile) D:\Tool\openAI\Skychat\semantic_score_clean> cd/d D:\Tool\Anaconda\envs\userprofile

    (userprofile) D:\Tool\Anaconda\envs\userprofile>cd /d D:Tool\openAI\SkyChat\userprofile
    系统找不到指定的路径。

    (userprofile) D:\Tool\Anaconda\envs\userprofile>cd /d D:\openAI\SkyChat\userprofile
    系统找不到指定的路径。

    (userprofile) D:\Tool\Anaconda\envs\userprofile>pip install -r requirements.txt
    ERROR: Could not open requirements file: [Errno 2] No such file or directory: ‘requirements.txt’

    (userprofile) D:\Tool\Anaconda\envs\userprofile>cd /d D:\openAI\SkyChat\semantic_score_clean
    系统找不到指定的路径。

    (userprofile) D:\Tool\Anaconda\envs\userprofile>cd /d D:Tool\openAI\SkyChat\semantic_score_clean
    系统找不到指定的路径。

    (userprofile) D:\Tool\Anaconda\envs\userprofile>cd
    D:\Tool\Anaconda\envs\userprofile

    (userprofile) D:\Tool\Anaconda\envs\userprofile>

  • Booth
    Booth 2023-03-16 18:34

    到底哪里错了

    • PhiltreX
      PhiltreX 2023-03-16 19:42

      @Booth你的D:\openAI\SkyChat\semantic_score_clean路径内,有requirements.txt这个文件吗?

    • Booth
      Booth 2023-03-16 20:55

      @PhiltreX没有,安装的东西去哪里了,
      怎么回事?

    • Booth
      Booth 2023-03-16 21:05

      @PhiltreX(userprofile) D:\Tool\Anaconda\envs\userprofile>cd /d D:Tool\openAI\SkyChat\userprofile
      系统找不到指定的路径。
      也不是这个这里,这个东西放哪里了?

    • PhiltreX
      PhiltreX 2023-03-17 02:08

      @Booth你手动能找到吗?打开我的电脑D盘的Tool\Anaconda\envs\userprofile>cd /d D:Tool\openAI\SkyChat里有userprofile这个文件夹吗?

  • Booth
    Booth 2023-03-16 18:58

    路径就增加了一个Tool,后面跳转的时候,也是相应的加上的呀?所有的过程都发送了,拜托您麻烦查查是什么问题?

    • PhiltreX
      PhiltreX 2023-03-16 19:32

      @Booth你好,我看了一看,没理解为什么要python -m pip uninstall numpy执行这个呢,您把numpy给卸载了哦。

    • Booth
      Booth 2023-03-16 20:56

      @PhiltreX注意:如果您是Miniconda可以跳过该步骤,如果您是Anaconda,执行如下命令,该命令用来删掉初始自带的numpy——为了完成这步呀

    • PhiltreX
      PhiltreX 2023-03-17 02:08

      @Booth哦哦 你是anaconda啊

  • frosty
    frosty 2023-03-17 16:59

    pip install -r requirements.txt,这一步总是timeout,后来差了才知道是因为没有魔法网络,换了一个pip镜像才弄好,skychat应该会有只是想聊天的非python专业的人来用,镜像应该是个普遍问题,建议写进文章里

    • PhiltreX
      PhiltreX 2023-03-17 17:08

      @frosty您说的没错,但是魔法网络的内容其实非常敏感,本站希望能够良性的发展下去,所以不太敢提及相关内容。
      关于TimeOut其实就是时间超时,但是您之前没有关于网络方面的报错,一直提的都是找不到requirements.txt的文件问题,所以本站默认您网络是没有问题的。

  • frosty
    frosty 2023-03-17 17:52

    请问安装好以后,两个环境都启动了,一个在http://192.168.2.61:8000,一个在http://192.168.2.61:8001,但无论访问哪个都显示Not Found
    The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

  • bai
    bai 2023-03-18 12:57

    c) D:\openAI\SkyChat\semantic_score_clean>python semantic_score_api.py
    load ./models/lr5e-06_batch256_epoch10_bs1_finetune3_half/
    default threshold 0.95
    ————————————————————————————————————————
    Starting Python Flask Server For Semantic Score…
    start service : Sat, 18 Mar 2023 04:55:57 +0000
    * Serving Flask app ‘semantic_score_api’
    * Debug mode: off
    WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
    * Running on all addresses (0.0.0.0)
    * Running on http://127.0.0.1:8000
    * Running on http://192.168.207.17:8000
    Press CTRL+C to quit

    这要怎么解决啊?

  • lsf
    lsf 2023-03-19 12:36

    成功启动,但是没有页面?

    Not Found
    The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

    • PhiltreX
      PhiltreX 2023-03-19 15:54

      @lsf建议直接贴出来输出日志,只有这个我是没有办法判断问题的哈。

  • Gare
    Gare 2023-03-19 12:47

    启动Semantic服务失败,不知如何解决
    Starting Python Flask Server For Semantic Score…
    start service : Sun, 19 Mar 2023 04:38:30 +0000
    * Serving Flask app ‘semantic_score_api’
    * Debug mode: off
    WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
    * Running on all addresses (0.0.0.0)
    * Running on http://127.0.0.1:8000
    * Running on http://192.168.124.11:8000
    Press CTRL+C to quit

    • PhiltreX
      PhiltreX 2023-03-19 15:53

      @Gare没有失败啊,从输出信息看,服务已经启动成功,并且已经运行在本地计算机上的两个地址上:http://127.0.0.1:8000 和 http://192.168.124.11:8000。您可以通过在 Web 浏览器中输入其中一个地址来查看服务是否正在运行。

      如果您遇到了其他问题,例如无法连接到服务或访问服务的特定功能,则建议您查看日志文件或调试输出以获取更多信息。您还可以考虑在启动服务时启用调试模式以获取更详细的日志输出。

  • hj
    hj 2023-03-19 16:16

    自动安装semantic的相关依赖库, 这一步下的好慢,10 kb ,而且经常出错,是为啥

    • hj
      hj 2023-03-19 16:22

      @hjERROR: Exception:
      Traceback (most recent call last):
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_vendor\urllib3\response.py”, line 438, in _error_catcher
      yield
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_vendor\urllib3\response.py”, line 561, in read
      data = self._fp_read(amt) if not fp_closed else b””
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_vendor\urllib3\response.py”, line 527, in _fp_read
      return self._fp.read(amt) if amt is not None else self._fp.read()
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py”, line 90, in read
      data = self.__fp.read(amt)
      File “D:\1\chat\envs\semantic\lib\http\client.py”, line 465, in read
      s = self.fp.read(amt)
      File “D:\1\chat\envs\semantic\lib\socket.py”, line 705, in readinto
      return self._sock.recv_into(b)
      File “D:\1\chat\envs\semantic\lib\ssl.py”, line 1274, in recv_into
      return self.read(nbytes, buffer)
      File “D:\1\chat\envs\semantic\lib\ssl.py”, line 1130, in read
      return self._sslobj.read(len, buffer)
      TimeoutError: The read operation timed out

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_internal\cli\base_command.py”, line 160, in exc_logging_wrapper
      status = run_func(*args)
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_internal\cli\req_command.py”, line 247, in wrapper
      return func(self, options, args)
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_internal\commands\install.py”, line 419, in run
      requirement_set = resolver.resolve(
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py”, line 92, in resolve
      result = self._result = resolver.resolve(
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_vendor\resolvelib\resolvers.py”, line 481, in resolve
      state = resolution.resolve(requirements, max_rounds=max_rounds)
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_vendor\resolvelib\resolvers.py”, line 348, in resolve
      self._add_to_criteria(self.state.criteria, r, parent=None)
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_vendor\resolvelib\resolvers.py”, line 172, in _add_to_criteria
      if not criterion.candidates:
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_vendor\resolvelib\structs.py”, line 151, in __bool__
      return bool(self._sequence)
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py”, line 155, in __bool__
      return any(self)
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py”, line 143, in
      return (c for c in iterator if id(c) not in self._incompatible_ids)
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py”, line 47, in _iter_built
      candidate = func()
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py”, line 206, in _make_candidate_from_link
      self._link_candidate_cache[link] = LinkCandidate(
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py”, line 297, in __init__
      super().__init__(
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py”, line 162, in __init__
      self.dist = self._prepare()
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py”, line 231, in _prepare
      dist = self._prepare_distribution()
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py”, line 308, in _prepare_distribution
      return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_internal\operations\prepare.py”, line 491, in prepare_linked_requirement
      return self._prepare_linked_requirement(req, parallel_builds)
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_internal\operations\prepare.py”, line 536, in _prepare_linked_requirement
      local_file = unpack_url(
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_internal\operations\prepare.py”, line 166, in unpack_url
      file = get_http_url(
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_internal\operations\prepare.py”, line 107, in get_http_url
      from_path, content_type = download(link, temp_dir.path)
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_internal\network\download.py”, line 147, in __call__
      for chunk in chunks:
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_internal\cli\progress_bars.py”, line 53, in _rich_progress_bar
      for chunk in iterable:
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_internal\network\utils.py”, line 63, in response_chunks
      for chunk in response.raw.stream(
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_vendor\urllib3\response.py”, line 622, in stream
      data = self.read(amt=amt, decode_content=decode_content)
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_vendor\urllib3\response.py”, line 560, in read
      with self._error_catcher():
      File “D:\1\chat\envs\semantic\lib\contextlib.py”, line 153, in __exit__
      self.gen.throw(typ, value, traceback)
      File “D:\1\chat\envs\semantic\lib\site-packages\pip\_vendor\urllib3\response.py”, line 443, in _error_catcher
      raise ReadTimeoutError(self._pool, None, “Read timed out.”)
      pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=’files.pythonhosted.org’, port=443): Read timed out.
      这是出错后弹出的

    • PhiltreX
      PhiltreX 2023-03-19 16:45

      @hjHTTPSConnectionPool(host=’files.pythonhosted.org’, port=443): Read timed out.
      一般来讲,只要您看到有关443或HTTPS的报错内容,那基本可以肯定就是网络的问题了。

    • hj
      hj 2023-03-19 16:43

      @hj好吧,我仔细看了一下评论,才看见要科学上网,希望最好能在文章里稍微暗示一下。

    • PhiltreX
      PhiltreX 2023-03-19 16:45

      @hj怕被制裁诶

    • PhiltreX
      PhiltreX 2023-03-19 16:45

      @hj因为没有魔法

    • hj
      hj 2023-03-19 18:32

      @PhiltreX在启动Semantic服务,后会有
      (semantic) D:\openAI\SkyChat\semantic_score_clean>python semantic_score_api.py
      load ./models/lr5e-06_batch256_epoch10_bs1_finetune3_half/
      default threshold 0.95
      ————————————————————————————————————————
      Starting Python Flask Server For Semantic Score…
      start service : Sun, 19 Mar 2023 10:22:34 +0000
      * Serving Flask app ‘semantic_score_api’
      * Debug mode: off
      WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
      * Running on all addresses (0.0.0.0)
      * Running on http://127.0.0.1:8000
      * Running on http://10.2.0.2:8000
      Press CTRL+C to quit
      怎么搞

    • PhiltreX
      PhiltreX 2023-03-20 11:35

      @hj您这给出的并不是报错信息,我无法根据启动信息来排查错误在哪里哦,我需要的是错误日志。

    • hj
      hj 2023-03-20 13:31

      @PhiltreXMicrosoft Windows [版本 10.0.22621.1413]
      (c) Microsoft Corporation。保留所有权利。

      C:\Users\10923>conda update -n base -c defaults conda
      Retrieving notices: …working… done
      Collecting package metadata (current_repodata.json): done
      Solving environment: done

      # All requested packages already installed.

      C:\Users\10923>conda create -n semantic
      WARNING: A conda environment already exists at ‘D:\1\chat\envs\semantic’
      Remove existing environment (y/[n])?

      CondaSystemExit: Exiting.

      C:\Users\10923>conda info –envs
      # conda environments:
      #
      base D:\1\chat
      semantic D:\1\chat\envs\semantic
      userprofile D:\1\chat\envs\userprofile

      C:\Users\10923>conda activate semantic

      (semantic) C:\Users\10923>conda install pip
      Collecting package metadata (current_repodata.json): failed

      CondaHTTPError: HTTP 000 CONNECTION FAILED for url
      Elapsed: –

      An HTTP error occurred when trying to retrieve this URL.
      HTTP errors are often intermittent, and a simple retry will get you on your way.

      If your current network has https://www.anaconda.com blocked, please file
      a support request with your network engineering team.

      ‘https//repo.anaconda.com/pkgs/msys2/noarch’

      (semantic) C:\Users\10923>
      (semantic) C:\Users\10923>cd /d D:\openAI\SkyChat\semantic_score_clean

      (semantic) D:\openAI\SkyChat\semantic_score_clean>pip install -r requirements.txt
      Requirement already satisfied: transformers in d:\1\chat\envs\semantic\lib\site-packages (from -r requirements.txt (line 1)) (4.27.1)
      Requirement already satisfied: flask in d:\1\chat\envs\semantic\lib\site-packages (from -r requirements.txt (line 2)) (2.2.3)
      Requirement already satisfied: torch in c:\users\10923\appdata\roaming\python\python310\site-packages (from -r requirements.txt (line 3)) (1.11.0+cu115)
      Requirement already satisfied: filelock in d:\1\chat\envs\semantic\lib\site-packages (from transformers->-r requirements.txt (line 1)) (3.10.0)
      Requirement already satisfied: regex!=2019.12.17 in d:\1\chat\envs\semantic\lib\site-packages (from transformers->-r requirements.txt (line 1)) (2022.10.31)
      Requirement already satisfied: packaging>=20.0 in d:\1\chat\envs\semantic\lib\site-packages (from transformers->-r requirements.txt (line 1)) (23.0)
      Requirement already satisfied: requests in d:\1\chat\envs\semantic\lib\site-packages (from transformers->-r requirements.txt (line 1)) (2.28.2)
      Requirement already satisfied: tqdm>=4.27 in d:\1\chat\envs\semantic\lib\site-packages (from transformers->-r requirements.txt (line 1)) (4.65.0)
      Requirement already satisfied: pyyaml>=5.1 in d:\1\chat\envs\semantic\lib\site-packages (from transformers->-r requirements.txt (line 1)) (6.0)
      Requirement already satisfied: tokenizers!=0.11.3,=0.11.1 in d:\1\chat\envs\semantic\lib\site-packages (from transformers->-r requirements.txt (line 1)) (0.13.2)
      Requirement already satisfied: huggingface-hub=0.11.0 in d:\1\chat\envs\semantic\lib\site-packages (from transformers->-r requirements.txt (line 1)) (0.13.2)
      Requirement already satisfied: numpy>=1.17 in d:\1\chat\envs\semantic\lib\site-packages (from transformers->-r requirements.txt (line 1)) (1.24.2)
      Requirement already satisfied: Jinja2>=3.0 in d:\1\chat\envs\semantic\lib\site-packages (from flask->-r requirements.txt (line 2)) (3.1.2)
      Requirement already satisfied: Werkzeug>=2.2.2 in d:\1\chat\envs\semantic\lib\site-packages (from flask->-r requirements.txt (line 2)) (2.2.3)
      Requirement already satisfied: itsdangerous>=2.0 in d:\1\chat\envs\semantic\lib\site-packages (from flask->-r requirements.txt (line 2)) (2.1.2)
      Requirement already satisfied: click>=8.0 in d:\1\chat\envs\semantic\lib\site-packages (from flask->-r requirements.txt (line 2)) (8.1.3)
      Requirement already satisfied: typing-extensions in c:\users\10923\appdata\roaming\python\python310\site-packages (from torch->-r requirements.txt (line 3)) (4.5.0)
      Requirement already satisfied: colorama in d:\1\chat\envs\semantic\lib\site-packages (from click>=8.0->flask->-r requirements.txt (line 2)) (0.4.6)
      Requirement already satisfied: MarkupSafe>=2.0 in d:\1\chat\envs\semantic\lib\site-packages (from Jinja2>=3.0->flask->-r requirements.txt (line 2)) (2.1.2)
      Requirement already satisfied: charset-normalizer=2 in d:\1\chat\envs\semantic\lib\site-packages (from requests->transformers->-r requirements.txt (line 1)) (3.1.0)
      Requirement already satisfied: certifi>=2017.4.17 in d:\1\chat\envs\semantic\lib\site-packages (from requests->transformers->-r requirements.txt (line 1)) (2022.12.7)
      Requirement already satisfied: urllib3=1.21.1 in d:\1\chat\envs\semantic\lib\site-packages (from requests->transformers->-r requirements.txt (line 1)) (1.26.15)
      Requirement already satisfied: idna=2.5 in d:\1\chat\envs\semantic\lib\site-packages (from requests->transformers->-r requirements.txt (line 1)) (3.4)

      (semantic) D:\openAI\SkyChat\semantic_score_clean>python semantic_score_api.py
      load ./models/lr5e-06_batch256_epoch10_bs1_finetune3_half/
      default threshold 0.95
      ————————————————————————————————————————
      Starting Python Flask Server For Semantic Score…
      start service : Mon, 20 Mar 2023 05:04:22 +0000
      * Serving Flask app ‘semantic_score_api’
      * Debug mode: off
      WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
      * Running on all addresses (0.0.0.0)
      * Running on http://127.0.0.1:8000
      * Running on http://192.168.1.116:8000
      Press CTRL+C to quit
      这样可以吗,不懂,就全发出来了

    • PhiltreX
      PhiltreX 2023-03-20 14:13

      @hj您好,你查看了当前所有的 Conda 环境,并激活了 “semantic” 环境。接着,你尝试安装 pip 包管理器,但由于 HTTP 错误,安装失败了。之后,你进入了 Semantic Score 应用程序的目录,并使用 pip 安装了一些必要的 Python 库。
      最后,你在运行了一个名为 semantic_score_api.py 的 Python 脚本,它启动了一个基于 Flask 的 Web 服务,监听端口 8000,可以响应关于语义分数的 HTTP 请求。
      可是在你使用php包管理器的时候,你当时遇到了HTTP错误,所以即便后面Flask成功启动,也是无法正常使用的,您应该先解决conda install pip报错的问题。

    • hj
      hj 2023-03-21 23:31

      @PhiltreX然后呢,然后呢😳

    • hj
      hj 2023-03-19 18:33

      @PhiltreX要点ctrl+c吗

    • hj
      hj 2023-03-19 18:42

      @PhiltreX您发的SkyChat里只有semantic_score_clean和user_profile_clean没有userprofile唉

    • PhiltreX
      PhiltreX 2023-03-20 11:34

      @hj重新拉取一下呢?

    • hj
      hj 2023-03-20 13:37

      @PhiltreX您发的openAI里就只有这两个啊,但下的Miniconda里有个userprofile的文件夹

  • AItomato
    AItomato 2023-03-22 16:56

    × Encountered error while trying to install package.
    ╰─> Numpy

    note: This is an issue with the package mentioned above, not pip.
    hint: See above for output from the failure.

    安装numpy1.16.4失败,是win11系统问题吗?安装1.20.0版本可以但是运行server_v3.py报以下错误:
    SourceChangeWarning: source code of class ‘torch.nn.modules.normalization.LayerNorm’ has changed. you can retrieve the original source code by accessing the object’s source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
    之后进入http://127.0.0.1:8001网页显示404

    • AItomato
      AItomato 2023-03-22 16:59

      @AItomato还有想知道您这边虚拟环境是基于Python什么版本构建的?这边是基于3.8.12的

  • Arno
    Arno 2023-03-25 22:56

    您好,这个好像有错误:cd /d D:\openAI\SkyChat\userprofile 原作者是cd C:\你的路径\user_profile_clean\user_profile_cleancd 到解压好的user_profile_clean文件夹
    ,文件夹名字有问题

  • nor
    nor 2023-03-26 11:03

    打开网站显示的就是
    Not Found
    The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
    cmd里面输出
    127.0.0.1 – – [26/Mar/2023 11:00:08] “GET / HTTP/1.1” 404 –
    10.19.104.11 – – [26/Mar/2023 11:00:38] “GET / HTTP/1.1” 404 –
    用不用魔法这个网址我都进不去

    • PhiltreX
      PhiltreX 2023-03-26 12:13

      @nor文件不存在, 这个和开不开麻烦没什么关系,建议检查一下日志文件中的详细报错信息,这段太模糊了。

  • 天体运行
    天体运行 2023-03-28 20:12

    error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools”: https://visualstudio.microsoft.com/visual-cpp-build-tools/
    [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
    Rolling back uninstall of numpy
    Moving to c:\users\dell\anaconda3\envs\userprofile\lib\site-packages\numpy-1.24.1.dist-info\
    from C:\Users\DELL\anaconda3\envs\userprofile\Lib\site-packages\~umpy-1.24.1.dist-info
    Moving to c:\users\dell\anaconda3\envs\userprofile\lib\site-packages\numpy\
    from C:\Users\DELL\anaconda3\envs\userprofile\Lib\site-packages\~umpy
    Moving to c:\users\dell\anaconda3\envs\userprofile\scripts\f2py.exe
    from C:\Users\DELL\AppData\Local\Temp\pip-uninstall-wpinqlyy\f2py.exe
    error: legacy-install-failure

    × Encountered error while trying to install package.
    ╰─> Numpy

    note: This is an issue with the package mentioned above, not pip.
    hint: See above for output from the failure.

    安装不了1.16.4版本的numpy ,其他版本的可以吗。

    • 天体运行
      天体运行 2023-03-28 20:24

      @天体运行(semantic) D:\openAI\SkyChat\semantic_score_clean>python semantic_score_api.py
      load ./models/lr5e-06_batch256_epoch10_bs1_finetune3_half/
      default threshold 0.95
      ————————————————————————————————————————
      Starting Python Flask Server For Semantic Score…
      start service : Tue, 28 Mar 2023 12:23:04 +0000
      * Serving Flask app ‘semantic_score_api’
      * Debug mode: off
      以一种访问权限不允许的方式做了一个访问套接字的尝试。

      (semantic) D:\openAI\SkyChat\semantic_score_clean>
      这个什么情况,日志在哪看啊

    • 天体运行
      天体运行 2023-03-28 21:01

      @天体运行还有就是, warnings.warn(msg, SourceChangeWarning)
      * Serving Flask app ‘server_v3’
      * Debug mode: off
      WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
      * Running on all addresses (0.0.0.0)
      * Running on http://127.0.0.1:8001
      * Running on http://176.20.33.18:8001
      Press CTRL+C to quit
      这里要改成wsgi启动么
      按网上改没有报错相应模块

    • PhiltreX
      PhiltreX 2023-03-29 00:46

      @天体运行根据警告信息,这是一个开发服务器,不适合在生产环境中使用,应该使用生产级别的 WSGI 服务器来运行你的应用程序。
      这这是警告信息,并不算错误,不影响使用。

    • PhiltreX
      PhiltreX 2023-03-29 00:47

      @天体运行可能是启动 Flask 应用程序时发生了权限问题。可能是由于当前用户没有足够的权限来访问 Flask 应用程序尝试的端口。你可以尝试以管理员身份运行命令行,或者将端口更改为没有被占用的端口。

    • PhiltreX
      PhiltreX 2023-03-29 00:49

      @天体运行没测试过其它版本,这个还真不太清楚。

    • 天体运行
      天体运行 2023-03-29 15:11

      @PhiltreX您使用的python是什么版本的啊。

      额外有个问题,127.0.0.1ping一般故障,上网啥的都正常,找了两天都没法解决。

    • PhiltreX
      PhiltreX 2023-03-29 15:20

      @天体运行可以给127加端口号ping一下试试,本站的python版本是3.10

微信