Microsoft Windows [版本 10.0.22631.3296]
(c) Microsoft Corporation。保留所有权利。
//////////////////////////////////////////////////////////////////////////////////////////////////>pip install Flask
Requirement already satisfied: Flask in d:\python\lib\site-packages (3.0.2)
Requirement already satisfied: Werkzeug>=3.0.0 in d:\python\lib\site-packages (from Flask) (3.0.2)
Requirement already satisfied: Jinja2>=3.1.2 in d:\python\lib\site-packages (from Flask) (3.1.3)
Requirement already satisfied: itsdangerous>=2.1.2 in d:\python\lib\site-packages (from Flask) (2.1.2)
Requirement already satisfied: click>=8.1.3 in d:\python\lib\site-packages (from Flask) (8.1.7)
Requirement already satisfied: blinker>=1.6.2 in d:\python\lib\site-packages (from Flask) (1.7.0)
Requirement already satisfied: colorama in d:\python\lib\site-packages (from click>=8.1.3->Flask) (0.4.6)
Requirement already satisfied: MarkupSafe>=2.0 in d:\python\lib\site-packages (from Jinja2>=3.1.2->Flask) (2.1.5)
//////////////////////////////////////////////////////////////////////////////////////////////////>pip list
Package Version
------------------ --------
blinker 1.7.0
certifi 2024.2.2
charset-normalizer 3.3.2
click 8.1.7
colorama 0.4.6
Flask 3.0.2
idna 3.6
itsdangerous 2.1.2
Jinja2 3.1.3
MarkupSafe 2.1.5
pip 24.0
requests 2.31.0
setuptools 65.5.0
urllib3 2.2.1
Werkzeug 3.0.2
//////////////////////////////////////////////////////////////////////////////////////////////////>Flask
Error: While importing 'app', an ImportError was raised:
Traceback (most recent call last):
File "D:\python\Lib\site-packages\flask\cli.py", line 247, in locate_app
__import__(module_name)
File "//////////////////////////////////////////////////////////////////////////////////////////////////\app.py", line 3, in <module>
import llm_api.sparkAPI as sparkAPI
File "//////////////////////////////////////////////////////////////////////////////////////////////////\llm_api\sparkAPI.py", line 19, in <module>
import websocket
ModuleNotFoundError: No module named 'websocket'
Usage: flask [OPTIONS] COMMAND [ARGS]...
A general utility script for Flask applications.
An application to load must be given with the '--app' option, 'FLASK_APP'
environment variable, or with a 'wsgi.py' or 'app.py' file in the current
directory.
Options:
-e, --env-file FILE Load environment variables from this file. python-
dotenv must be installed.
-A, --app IMPORT The Flask application or factory function to load, in
the form 'module:name'. Module can be a dotted import
or file path. Name is not required if it is 'app',
'application', 'create_app', or 'make_app', and can be
'name(args)' to pass arguments.
--debug / --no-debug Set debug mode.
--version Show the Flask version.
--help Show this message and exit.
Commands:
routes Show the routes for the app.
run Run a development server.
shell Run a shell in the app context.
//////////////////////////////////////////////////////////////////////////////////////////////////>pip install websocket-client
Collecting websocket-client
Using cached websocket_client-1.7.0-py3-none-any.whl.metadata (7.9 kB)
Using cached websocket_client-1.7.0-py3-none-any.whl (58 kB)
Installing collected packages: websocket-client
Successfully installed websocket-client-1.7.0
//////////////////////////////////////////////////////////////////////////////////////////////////>Flask
Error: While importing 'app', an ImportError was raised:
Traceback (most recent call last):
File "D:\python\Lib\site-packages\flask\cli.py", line 247, in locate_app
__import__(module_name)
File "//////////////////////////////////////////////////////////////////////////////////////////////////\app.py", line 3, in <module>
import llm_api.sparkAPI as sparkAPI
File "//////////////////////////////////////////////////////////////////////////////////////////////////\llm_api\sparkAPI.py", line 20, in <module>
import openpyxl
ModuleNotFoundError: No module named 'openpyxl'
Usage: flask [OPTIONS] COMMAND [ARGS]...
A general utility script for Flask applications.
An application to load must be given with the '--app' option, 'FLASK_APP'
environment variable, or with a 'wsgi.py' or 'app.py' file in the current
directory.
Options:
-e, --env-file FILE Load environment variables from this file. python-
dotenv must be installed.
-A, --app IMPORT The Flask application or factory function to load, in
the form 'module:name'. Module can be a dotted import
or file path. Name is not required if it is 'app',
'application', 'create_app', or 'make_app', and can be
'name(args)' to pass arguments.
--debug / --no-debug Set debug mode.
--version Show the Flask version.
--help Show this message and exit.
Commands:
routes Show the routes for the app.
run Run a development server.
shell Run a shell in the app context.
//////////////////////////////////////////////////////////////////////////////////////////////////>pip install openpyxl
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/openpyxl/
Collecting openpyxl
Downloading openpyxl-3.1.2-py2.py3-none-any.whl.metadata (2.5 kB)
Collecting et-xmlfile (from openpyxl)
Downloading et_xmlfile-1.1.0-py3-none-any.whl.metadata (1.8 kB)
Downloading openpyxl-3.1.2-py2.py3-none-any.whl (249 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 250.0/250.0 kB 255.9 kB/s eta 0:00:00
Downloading et_xmlfile-1.1.0-py3-none-any.whl (4.7 kB)
Installing collected packages: et-xmlfile, openpyxl
Successfully installed et-xmlfile-1.1.0 openpyxl-3.1.2
//////////////////////////////////////////////////////////////////////////////////////////////////>Flask
Error: While importing 'app', an ImportError was raised:
Traceback (most recent call last):
File "D:\python\Lib\site-packages\flask\cli.py", line 247, in locate_app
__import__(module_name)
File "//////////////////////////////////////////////////////////////////////////////////////////////////\app.py", line 5, in <module>
import llm_api.qwenAPI as qwenAPI
File "//////////////////////////////////////////////////////////////////////////////////////////////////\llm_api\qwenAPI.py", line 3, in <module>
import dashscope
ModuleNotFoundError: No module named 'dashscope'
Usage: flask [OPTIONS] COMMAND [ARGS]...
A general utility script for Flask applications.
An application to load must be given with the '--app' option, 'FLASK_APP'
environment variable, or with a 'wsgi.py' or 'app.py' file in the current
directory.
Options:
-e, --env-file FILE Load environment variables from this file. python-
dotenv must be installed.
-A, --app IMPORT The Flask application or factory function to load, in
the form 'module:name'. Module can be a dotted import
or file path. Name is not required if it is 'app',
'application', 'create_app', or 'make_app', and can be
'name(args)' to pass arguments.
--debug / --no-debug Set debug mode.
--version Show the Flask version.
--help Show this message and exit.
Commands:
routes Show the routes for the app.
run Run a development server.
shell Run a shell in the app context.
//////////////////////////////////////////////////////////////////////////////////////////////////>pip install dashscope
Collecting dashscope
Downloading dashscope-1.17.0-py3-none-any.whl.metadata (6.6 kB)
INFO: pip is looking at multiple versions of dashscope to determine which version is compatible with other requirements. This could take a while.
Downloading dashscope-1.16.0-py3-none-any.whl.metadata (6.7 kB)
Downloading dashscope-1.15.0-py3-none-any.whl.metadata (6.7 kB)
Downloading dashscope-1.14.1-py3-none-any.whl.metadata (6.7 kB)
Downloading dashscope-1.14.0-py3-none-any.whl.metadata (6.7 kB)
Downloading dashscope-1.13.6-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.13.5-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.13.4-py3-none-any.whl.metadata (7.2 kB)
INFO: pip is still looking at multiple versions of dashscope to determine which version is compatible with other requirements. This could take a while.
Downloading dashscope-1.13.3-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.13.2-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.13.1-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.13.0-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.12.0-py3-none-any.whl.metadata (7.2 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.
Downloading dashscope-1.11.0-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.10.1-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.10.0-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.9.1-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.9.0-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.8.1-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.8.0-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.7.2-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.7.1-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.7.0-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.6.0-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.5.0-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.4.0-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.3.1-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.3.0-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.2.0-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.1.1-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.1.0-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.0.4-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.0.3-py3-none-any.whl.metadata (7.2 kB)
Downloading dashscope-1.0.2-py3-none-any.whl.metadata (7.5 kB)
Downloading dashscope-1.0.1-py3-none-any.whl.metadata (7.6 kB)
Downloading dashscope-1.0.0-py3-none-any.whl.metadata (8.2 kB)
ERROR: Cannot install dashscope==1.0.0, dashscope==1.0.1, dashscope==1.0.2, dashscope==1.0.3, dashscope==1.0.4, dashscope==1.1.0, dashscope==1.1.1, dashscope==1.10.0, dashscope==1.10.1, dashscope==1.11.0, dashscope==1.12.0, dashscope==1.13.0, dashscope==1.13.1, dashscope==1.13.2, dashscope==1.13.3, dashscope==1.13.4, dashscope==1.13.5, dashscope==1.13.6, dashscope==1.14.0, dashscope==1.14.1, dashscope==1.15.0, dashscope==1.16.0, dashscope==1.17.0, dashscope==1.2.0, dashscope==1.3.0, dashscope==1.3.1, dashscope==1.4.0, dashscope==1.5.0, dashscope==1.6.0, dashscope==1.7.0, dashscope==1.7.1, dashscope==1.7.2, dashscope==1.8.0, dashscope==1.8.1, dashscope==1.9.0 and dashscope==1.9.1 because these package versions have conflicting dependencies.
The conflict is caused by:
dashscope 1.17.0 depends on aiohttp
dashscope 1.16.0 depends on aiohttp
dashscope 1.15.0 depends on aiohttp
dashscope 1.14.1 depends on aiohttp
dashscope 1.14.0 depends on aiohttp
dashscope 1.13.6 depends on aiohttp
dashscope 1.13.5 depends on aiohttp
dashscope 1.13.4 depends on aiohttp
dashscope 1.13.3 depends on aiohttp
dashscope 1.13.2 depends on aiohttp
dashscope 1.13.1 depends on aiohttp
dashscope 1.13.0 depends on aiohttp
dashscope 1.12.0 depends on aiohttp
dashscope 1.11.0 depends on aiohttp
dashscope 1.10.1 depends on aiohttp
dashscope 1.10.0 depends on aiohttp
dashscope 1.9.1 depends on aiohttp
dashscope 1.9.0 depends on aiohttp
dashscope 1.8.1 depends on aiohttp
dashscope 1.8.0 depends on aiohttp
dashscope 1.7.2 depends on aiohttp
dashscope 1.7.1 depends on aiohttp
dashscope 1.7.0 depends on aiohttp
dashscope 1.6.0 depends on aiohttp
dashscope 1.5.0 depends on aiohttp
dashscope 1.4.0 depends on aiohttp
dashscope 1.3.1 depends on aiohttp
dashscope 1.3.0 depends on aiohttp
dashscope 1.2.0 depends on aiohttp
dashscope 1.1.1 depends on aiohttp
dashscope 1.1.0 depends on aiohttp
dashscope 1.0.4 depends on aiohttp
dashscope 1.0.3 depends on aiohttp
dashscope 1.0.2 depends on aiohttp
dashscope 1.0.1 depends on aiohttp
dashscope 1.0.0 depends on aiohttp
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
//////////////////////////////////////////////////////////////////////////////////////////////////>pip install dashscope==1.17.0
Collecting dashscope==1.17.0
Using cached dashscope-1.17.0-py3-none-any.whl.metadata (6.6 kB)
Collecting aiohttp (from dashscope==1.17.0)
Downloading aiohttp-3.9.3-cp311-cp311-win_amd64.whl.metadata (7.6 kB)
Requirement already satisfied: requests in d:\python\lib\site-packages (from dashscope==1.17.0) (2.31.0)
Collecting aiosignal>=1.1.2 (from aiohttp->dashscope==1.17.0)
Downloading aiosignal-1.3.1-py3-none-any.whl.metadata (4.0 kB)
Collecting attrs>=17.3.0 (from aiohttp->dashscope==1.17.0)
Downloading attrs-23.2.0-py3-none-any.whl.metadata (9.5 kB)
Collecting frozenlist>=1.1.1 (from aiohttp->dashscope==1.17.0)
Downloading frozenlist-1.4.1-cp311-cp311-win_amd64.whl.metadata (12 kB)
Collecting multidict<7.0,>=4.5 (from aiohttp->dashscope==1.17.0)
Downloading multidict-6.0.5-cp311-cp311-win_amd64.whl.metadata (4.3 kB)
Collecting yarl<2.0,>=1.0 (from aiohttp->dashscope==1.17.0)
Downloading yarl-1.9.4-cp311-cp311-win_amd64.whl.metadata (32 kB)
Requirement already satisfied: charset-normalizer<4,>=2 in d:\python\lib\site-packages (from requests->dashscope==1.17.0) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in d:\python\lib\site-packages (from requests->dashscope==1.17.0) (3.6)
Requirement already satisfied: urllib3<3,>=1.21.1 in d:\python\lib\site-packages (from requests->dashscope==1.17.0) (2.2.1)
Requirement already satisfied: certifi>=2017.4.17 in d:\python\lib\site-packages (from requests->dashscope==1.17.0) (2024.2.2)
Downloading dashscope-1.17.0-py3-none-any.whl (1.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 12.3 kB/s eta 0:00:00
Downloading aiohttp-3.9.3-cp311-cp311-win_amd64.whl (365 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 365.3/365.3 kB 17.8 kB/s eta 0:00:00
Downloading aiosignal-1.3.1-py3-none-any.whl (7.6 kB)
Downloading attrs-23.2.0-py3-none-any.whl (60 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.8/60.8 kB 20.3 kB/s eta 0:00:00
Downloading frozenlist-1.4.1-cp311-cp311-win_amd64.whl (50 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 50.5/50.5 kB 14.8 kB/s eta 0:00:00
Downloading multidict-6.0.5-cp311-cp311-win_amd64.whl (28 kB)
Downloading yarl-1.9.4-cp311-cp311-win_amd64.whl (76 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 76.7/76.7 kB 13.2 kB/s eta 0:00:00
Installing collected packages: multidict, frozenlist, attrs, yarl, aiosignal, aiohttp, dashscope
Successfully installed aiohttp-3.9.3 aiosignal-1.3.1 attrs-23.2.0 dashscope-1.17.0 frozenlist-1.4.1 multidict-6.0.5 yarl-1.9.4
//////////////////////////////////////////////////////////////////////////////////////////////////>Flash
'Flash' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
//////////////////////////////////////////////////////////////////////////////////////////////////>Flask
Error: While importing 'app', an ImportError was raised:
Traceback (most recent call last):
File "D:\python\Lib\site-packages\flask\cli.py", line 247, in locate_app
__import__(module_name)
File "//////////////////////////////////////////////////////////////////////////////////////////////////\app.py", line 6, in <module>
import llm_api.kimichatAPI as kimichatAPI
File "//////////////////////////////////////////////////////////////////////////////////////////////////\llm_api\kimichatAPI.py", line 1, in <module>
from openai import OpenAI
ModuleNotFoundError: No module named 'openai'
Usage: flask [OPTIONS] COMMAND [ARGS]...
A general utility script for Flask applications.
An application to load must be given with the '--app' option, 'FLASK_APP'
environment variable, or with a 'wsgi.py' or 'app.py' file in the current
directory.
Options:
-e, --env-file FILE Load environment variables from this file. python-
dotenv must be installed.
-A, --app IMPORT The Flask application or factory function to load, in
the form 'module:name'. Module can be a dotted import
or file path. Name is not required if it is 'app',
'application', 'create_app', or 'make_app', and can be
'name(args)' to pass arguments.
--debug / --no-debug Set debug mode.
--version Show the Flask version.
--help Show this message and exit.
Commands:
routes Show the routes for the app.
run Run a development server.
shell Run a shell in the app context.
//////////////////////////////////////////////////////////////////////////////////////////////////>pip install openai
Collecting openai
Downloading openai-1.16.2-py3-none-any.whl.metadata (21 kB)
Collecting anyio<5,>=3.5.0 (from openai)
Downloading anyio-4.3.0-py3-none-any.whl.metadata (4.6 kB)
Collecting distro<2,>=1.7.0 (from openai)
Downloading distro-1.9.0-py3-none-any.whl.metadata (6.8 kB)
Collecting httpx<1,>=0.23.0 (from openai)
Downloading httpx-0.27.0-py3-none-any.whl.metadata (7.2 kB)
INFO: pip is looking at multiple versions of openai to determine which version is compatible with other requirements. This could take a while.
Collecting openai
Downloading openai-1.16.1-py3-none-any.whl.metadata (21 kB)
Downloading openai-1.16.0-py3-none-any.whl.metadata (21 kB)
Downloading openai-1.14.3-py3-none-any.whl.metadata (20 kB)
Downloading openai-1.14.2-py3-none-any.whl.metadata (19 kB)
Downloading openai-1.14.1-py3-none-any.whl.metadata (18 kB)
Downloading openai-1.14.0-py3-none-any.whl.metadata (18 kB)
Downloading openai-1.13.4-py3-none-any.whl.metadata (18 kB)
INFO: pip is still looking at multiple versions of openai to determine which version is compatible with other requirements. This could take a while.
Downloading openai-1.13.3-py3-none-any.whl.metadata (18 kB)
ERROR: Exception:
Traceback (most recent call last):
File "D:\python\Lib\site-packages\pip\_vendor\urllib3\response.py", line 438, in _error_catcher
yield
File "D:\python\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:\python\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:\python\Lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 98, in read
data: bytes = self.__fp.read(amt)
^^^^^^^^^^^^^^^^^^^
File "D:\python\Lib\http\client.py", line 473, in read
s = self.fp.read(amt)
^^^^^^^^^^^^^^^^^
File "D:\python\Lib\socket.py", line 706, in readinto
return self._sock.recv_into(b)
^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\Lib\ssl.py", line 1314, in recv_into
return self.read(nbytes, buffer)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\Lib\ssl.py", line 1166, 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:\python\Lib\site-packages\pip\_internal\cli\base_command.py", line 180, in exc_logging_wrapper
status = run_func(*args)
^^^^^^^^^^^^^^^
File "D:\python\Lib\site-packages\pip\_internal\cli\req_command.py", line 245, in wrapper
return func(self, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\Lib\site-packages\pip\_internal\commands\install.py", line 377, in run
requirement_set = resolver.resolve(
^^^^^^^^^^^^^^^^^
File "D:\python\Lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 95, in resolve
result = self._result = resolver.resolve(
^^^^^^^^^^^^^^^^^
File "D:\python\Lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 546, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\Lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 427, in resolve
failure_causes = self._attempt_to_pin_criterion(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\Lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 237, in _attempt_to_pin_criterion
for candidate in criterion.candidates:
File "D:\python\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 143, in <genexpr>
return (c for c in iterator if id(c) not in self._incompatible_ids)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 47, in _iter_built
candidate = func()
^^^^^^
File "D:\python\Lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 182, in _make_candidate_from_link
base: Optional[BaseCandidate] = self._make_base_candidate_from_link(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\Lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 228, in _make_base_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
^^^^^^^^^^^^^^
File "D:\python\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 290, in __init__
super().__init__(
File "D:\python\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 156, in __init__
self.dist = self._prepare()
^^^^^^^^^^^^^^^
File "D:\python\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 222, in _prepare
dist = self._prepare_distribution()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\Lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 301, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\Lib\site-packages\pip\_internal\operations\prepare.py", line 519, in prepare_linked_requirement
metadata_dist = self._fetch_metadata_only(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\Lib\site-packages\pip\_internal\operations\prepare.py", line 371, in _fetch_metadata_only
return self._fetch_metadata_using_link_data_attr(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\Lib\site-packages\pip\_internal\operations\prepare.py", line 391, in _fetch_metadata_using_link_data_attr
metadata_file = get_http_url(
^^^^^^^^^^^^^
File "D:\python\Lib\site-packages\pip\_internal\operations\prepare.py", line 109, in get_http_url
from_path, content_type = download(link, temp_dir.path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\Lib\site-packages\pip\_internal\network\download.py", line 147, in __call__
for chunk in chunks:
File "D:\python\Lib\site-packages\pip\_internal\network\utils.py", line 63, in response_chunks
for chunk in response.raw.stream(
File "D:\python\Lib\site-packages\pip\_vendor\urllib3\response.py", line 622, in stream
data = self.read(amt=amt, decode_content=decode_content)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\Lib\site-packages\pip\_vendor\urllib3\response.py", line 560, in read
with self._error_catcher():
File "D:\python\Lib\contextlib.py", line 158, in __exit__
self.gen.throw(typ, value, traceback)
File "D:\python\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.
//////////////////////////////////////////////////////////////////////////////////////////////////>pip install openai==1.16.2
Collecting openai==1.16.2
Using cached openai-1.16.2-py3-none-any.whl.metadata (21 kB)
Collecting anyio<5,>=3.5.0 (from openai==1.16.2)
Using cached anyio-4.3.0-py3-none-any.whl.metadata (4.6 kB)
Collecting distro<2,>=1.7.0 (from openai==1.16.2)
Using cached distro-1.9.0-py3-none-any.whl.metadata (6.8 kB)
Collecting httpx<1,>=0.23.0 (from openai==1.16.2)
Using cached httpx-0.27.0-py3-none-any.whl.metadata (7.2 kB)
INFO: pip is looking at multiple versions of openai to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement pydantic<3,>=1.9.0 (from openai) (from versions: none)
ERROR: No matching distribution found for pydantic<3,>=1.9.0
//////////////////////////////////////////////////////////////////////////////////////////////////>pip install pydantic==1.8.2
Collecting pydantic==1.8.2
Downloading pydantic-1.8.2-py3-none-any.whl.metadata (103 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 103.1/103.1 kB 8.4 kB/s eta 0:00:00
Collecting typing-extensions>=3.7.4.3 (from pydantic==1.8.2)
Using cached typing_extensions-4.10.0-py3-none-any.whl.metadata (3.0 kB)
Downloading pydantic-1.8.2-py3-none-any.whl (126 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 126.0/126.0 kB 5.0 kB/s eta 0:00:00
Downloading typing_extensions-4.10.0-py3-none-any.whl (33 kB)
Installing collected packages: typing-extensions, pydantic
Successfully installed pydantic-1.8.2 typing-extensions-4.10.0
//////////////////////////////////////////////////////////////////////////////////////////////////>Flask
Error: While importing 'app', an ImportError was raised:
Traceback (most recent call last):
File "D:\python\Lib\site-packages\flask\cli.py", line 247, in locate_app
__import__(module_name)
File "//////////////////////////////////////////////////////////////////////////////////////////////////\app.py", line 6, in <module>
import llm_api.kimichatAPI as kimichatAPI
File "//////////////////////////////////////////////////////////////////////////////////////////////////\llm_api\kimichatAPI.py", line 1, in <module>
from openai import OpenAI
ModuleNotFoundError: No module named 'openai'
Usage: flask [OPTIONS] COMMAND [ARGS]...
A general utility script for Flask applications.
An application to load must be given with the '--app' option, 'FLASK_APP'
environment variable, or with a 'wsgi.py' or 'app.py' file in the current
directory.
Options:
-e, --env-file FILE Load environment variables from this file. python-
dotenv must be installed.
-A, --app IMPORT The Flask application or factory function to load, in
the form 'module:name'. Module can be a dotted import
or file path. Name is not required if it is 'app',
'application', 'create_app', or 'make_app', and can be
'name(args)' to pass arguments.
--debug / --no-debug Set debug mode.
--version Show the Flask version.
--help Show this message and exit.
Commands:
routes Show the routes for the app.
run Run a development server.
shell Run a shell in the app context.
//////////////////////////////////////////////////////////////////////////////////////////////////>virtualenv
'virtualenv' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
//////////////////////////////////////////////////////////////////////////////////////////////////>pip install openai
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/openai/
Collecting openai
Using cached openai-1.16.2-py3-none-any.whl.metadata (21 kB)
Collecting anyio<5,>=3.5.0 (from openai)
Using cached anyio-4.3.0-py3-none-any.whl.metadata (4.6 kB)
Collecting distro<2,>=1.7.0 (from openai)
Using cached distro-1.9.0-py3-none-any.whl.metadata (6.8 kB)
Collecting httpx<1,>=0.23.0 (from openai)
Using cached httpx-0.27.0-py3-none-any.whl.metadata (7.2 kB)
Collecting pydantic<3,>=1.9.0 (from openai)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timedout. (read timeout=15)")': /packages/e5/f3/8296f550276194a58c5500d55b19a27ae0a5a3a51ffef66710c58544b32d/pydantic-2.6.4-py3-none-any.whl.metadata
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timedout. (read timeout=15)")': /packages/e5/f3/8296f550276194a58c5500d55b19a27ae0a5a3a51ffef66710c58544b32d/pydantic-2.6.4-py3-none-any.whl.metadata
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timedout. (read timeout=15)")': /packages/e5/f3/8296f550276194a58c5500d55b19a27ae0a5a3a51ffef66710c58544b32d/pydantic-2.6.4-py3-none-any.whl.metadata
Downloading pydantic-2.6.4-py3-none-any.whl.metadata (85 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 85.1/85.1 kB 136.8 kB/s eta 0:00:00
Collecting sniffio (from openai)
Downloading sniffio-1.3.1-py3-none-any.whl.metadata (3.9 kB)
Collecting tqdm>4 (from openai)
Downloading tqdm-4.66.2-py3-none-any.whl.metadata (57 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.6/57.6 kB 35.7 kB/s eta 0:00:00
Requirement already satisfied: typing-extensions<5,>=4.7 in d:\python\lib\site-packages (from openai) (4.10.0)
Requirement already satisfied: idna>=2.8 in d:\python\lib\site-packages (from anyio<5,>=3.5.0->openai) (3.6)
Requirement already satisfied: certifi in d:\python\lib\site-packages (from httpx<1,>=0.23.0->openai) (2024.2.2)
Collecting httpcore==1.* (from httpx<1,>=0.23.0->openai)
Downloading httpcore-1.0.5-py3-none-any.whl.metadata (20 kB)
Collecting h11<0.15,>=0.13 (from httpcore==1.*->httpx<1,>=0.23.0->openai)
Downloading h11-0.14.0-py3-none-any.whl.metadata (8.2 kB)
Collecting annotated-types>=0.4.0 (from pydantic<3,>=1.9.0->openai)
Downloading annotated_types-0.6.0-py3-none-any.whl.metadata (12 kB)
Collecting pydantic-core==2.16.3 (from pydantic<3,>=1.9.0->openai)
Downloading pydantic_core-2.16.3-cp311-none-win_amd64.whl.metadata (6.6 kB)
Requirement already satisfied: colorama in d:\python\lib\site-packages (from tqdm>4->openai) (0.4.6)
Downloading openai-1.16.2-py3-none-any.whl (267 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 267.1/267.1 kB 18.6 kB/s eta 0:00:00
Downloading anyio-4.3.0-py3-none-any.whl (85 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 85.6/85.6 kB 27.4 kB/s eta 0:00:00
Downloading distro-1.9.0-py3-none-any.whl (20 kB)
Downloading httpx-0.27.0-py3-none-any.whl (75 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 75.6/75.6 kB 19.0 kB/s eta 0:00:00
Downloading httpcore-1.0.5-py3-none-any.whl (77 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.9/77.9 kB 13.6 kB/s eta 0:00:00
Downloading pydantic-2.6.4-py3-none-any.whl (394 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 394.9/394.9 kB 16.4 kB/s eta 0:00:00
Downloading pydantic_core-2.16.3-cp311-none-win_amd64.whl (1.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.9/1.9 MB 19.8 kB/s eta 0:00:00
Downloading sniffio-1.3.1-py3-none-any.whl (10 kB)
Downloading tqdm-4.66.2-py3-none-any.whl (78 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.3/78.3 kB 8.8 kB/s eta 0:00:00
Downloading annotated_types-0.6.0-py3-none-any.whl (12 kB)
Downloading h11-0.14.0-py3-none-any.whl (58 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.3/58.3 kB 11.8 kB/s eta 0:00:00
Installing collected packages: tqdm, sniffio, pydantic-core, h11, distro, annotated-types, pydantic, httpcore, anyio, httpx, openai
Attempting uninstall: pydantic
Found existing installation: pydantic 1.8.2
Uninstalling pydantic-1.8.2:
Successfully uninstalled pydantic-1.8.2
Successfully installed annotated-types-0.6.0 anyio-4.3.0 distro-1.9.0 h11-0.14.0 httpcore-1.0.5 httpx-0.27.0 openai-1.16.2 pydantic-2.6.4 pydantic-core-2.16.3 sniffio-1.3.1 tqdm-4.66.2
//////////////////////////////////////////////////////////////////////////////////////////////////>Flask
Error: While importing 'app', an ImportError was raised:
Traceback (most recent call last):
File "D:\python\Lib\site-packages\flask\cli.py", line 247, in locate_app
__import__(module_name)
File "//////////////////////////////////////////////////////////////////////////////////////////////////\app.py", line 8, in <module>
from flask_mysqldb import MySQL
ModuleNotFoundError: No module named 'flask_mysqldb'
Usage: flask [OPTIONS] COMMAND [ARGS]...
A general utility script for Flask applications.
An application to load must be given with the '--app' option, 'FLASK_APP'
environment variable, or with a 'wsgi.py' or 'app.py' file in the current
directory.
Options:
-e, --env-file FILE Load environment variables from this file. python-
dotenv must be installed.
-A, --app IMPORT The Flask application or factory function to load, in
the form 'module:name'. Module can be a dotted import
or file path. Name is not required if it is 'app',
'application', 'create_app', or 'make_app', and can be
'name(args)' to pass arguments.
--debug / --no-debug Set debug mode.
--version Show the Flask version.
--help Show this message and exit.
Commands:
routes Show the routes for the app.
run Run a development server.
shell Run a shell in the app context.
//////////////////////////////////////////////////////////////////////////////////////////////////>pip install flask-mysqldb
Collecting flask-mysqldb
Downloading Flask_MySQLdb-2.0.0-py3-none-any.whl.metadata (3.0 kB)
Requirement already satisfied: Flask>=1.0.4 in d:\python\lib\site-packages (from flask-mysqldb) (3.0.2)
Collecting mysqlclient>=2.2.0 (from flask-mysqldb)
Downloading mysqlclient-2.2.4-cp311-cp311-win_amd64.whl.metadata (4.6 kB)
Requirement already satisfied: Werkzeug>=3.0.0 in d:\python\lib\site-packages (from Flask>=1.0.4->flask-mysqldb) (3.0.2)
Requirement already satisfied: Jinja2>=3.1.2 in d:\python\lib\site-packages (from Flask>=1.0.4->flask-mysqldb) (3.1.3)
Requirement already satisfied: itsdangerous>=2.1.2 in d:\python\lib\site-packages (from Flask>=1.0.4->flask-mysqldb) (2.1.2)
Requirement already satisfied: click>=8.1.3 in d:\python\lib\site-packages (from Flask>=1.0.4->flask-mysqldb) (8.1.7)
Requirement already satisfied: blinker>=1.6.2 in d:\python\lib\site-packages (from Flask>=1.0.4->flask-mysqldb) (1.7.0)
Requirement already satisfied: colorama in d:\python\lib\site-packages (from click>=8.1.3->Flask>=1.0.4->flask-mysqldb) (0.4.6)
Requirement already satisfied: MarkupSafe>=2.0 in d:\python\lib\site-packages (from Jinja2>=3.1.2->Flask>=1.0.4->flask-mysqldb) (2.1.5)
Downloading Flask_MySQLdb-2.0.0-py3-none-any.whl (4.9 kB)
Downloading mysqlclient-2.2.4-cp311-cp311-win_amd64.whl (203 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 203.2/203.2 kB 26.5 kB/s eta 0:00:00
Installing collected packages: mysqlclient, flask-mysqldb
Successfully installed flask-mysqldb-2.0.0 mysqlclient-2.2.4
//////////////////////////////////////////////////////////////////////////////////////////////////>Flask run
* 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 http://127.0.0.1:5000
Press CTRL+C to quit
//////////////////////////////////////////////////////////////////////////////////////////////////>