我使用的是 conda 环境,Python 版本 3.9.7、pip 22.3.1、numpy 1.24.0、gluoncv 0.10.5.post0、mxnet 1.7.0.post2
from gluoncv import data, utils 给出错误:
C:\Users\std\anaconda3\envs\myenv\lib\site-packages\mxnet\numpy\utils.py:37: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar. (This may have returned Python scalars in past versions
bool = onp.bool
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[1], line 3
1 #import cv2
2 #import os
----> 3 from gluoncv import data, utils #does not work
File ~\anaconda3\envs\myenv\lib\site-packages\gluoncv\__init__.py:16
14 _found_mxnet = _found_pytorch = False
15 try:
---> 16 …Run Code Online (Sandbox Code Playgroud) 我想升级我的 python 版本(在本例中升级到 3.10),因此在安装 python3.10 之后,我继续尝试添加一些我使用的模块,例如 opencv ,这遇到了:
jeremy@jeremy-Blade:~$ python3.10 -m pip install opencv-python
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/usr/lib/python3/dist-packages/pip/__main__.py", line 16, in <module>
from pip._internal.cli.main import main as _main # isort:skip # noqa
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main.py", line 10, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "/usr/lib/python3/dist-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
from …Run Code Online (Sandbox Code Playgroud) 我在运行时遇到以下错误mlflow app
引发 AttributeError("模块 {!r} 没有属性 " AttributeError: 模块 'numpy' 没有属性 'object'
有人可以帮我弄这个吗
Python版本:3.11
通过安装应用程序的依赖项pip install -r requirements.txt会出现以下错误:
socket.c -o build/temp.linux-armv8l-cpython-311/aiohttp/_websocket.o
aiohttp/_websocket.c:198:12: fatal error: 'longintrepr.h' file not found
#include "longintrepr.h"
^~~~~~~ 1 error generated.
error: command '/data/data/com.termux/files/usr/bin/arm-linux-androideabi-clang'
failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for aiohttp
Failed to build aiohttp
ERROR: Could not build wheels for aiohttp, which is required to install
pyproject.toml-based projects
Run Code Online (Sandbox Code Playgroud)
此错误特定于 Python3.11版本。在 Python 上,3.10.6 …
Run Code Online (Sandbox Code Playgroud)>>> import sys >>> sys.set_int_max_str_digits(4300) # Illustrative, this is the default. >>> _ = int('2' * 5432) Traceback (most recent call last): ... ValueError: Exceeds the limit (4300) for integer string conversion: value has 5432 digits.
Python 3.10.7 引入了类型转换的这一重大更改。
文档:整数字符串转换长度限制
其实我不明白为什么
我正在尝试在 google colab 中安装 pycaret==3.0.0,但我遇到了一个问题,该库需要安装 Jinja2,我就是这样做的,但最终它抛出了另一个错误。
ImportError Traceback (most recent call last)
<ipython-input-26-4f8843d24b3a> in <module>()
----> 1 import jinja2
2 from pycaret.regression import *
3 frames
/usr/local/lib/python3.7/dist-packages/jinja2/filters.py in <module>()
11 from markupsafe import escape
12 from markupsafe import Markup
---> 13 from markupsafe import soft_unicode
14
15 from ._compat import abc
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/root/.local/lib/python3.7/site-packages/markupsafe/__init__.py)
Run Code Online (Sandbox Code Playgroud) 我已经安装了 spacy 并下载了 en_core_web_sm : pip install spacy python -m spacy download en_core_web_sm 还尝试了 pip3 install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.2.0/en_core_web_sm-2.2。 0.tar.gz
我的spaCy版本:2.2.0 我的Python版本:3.7.4
但是,它仍然显示错误: OSError:[E050]找不到模型'en_core_web_md'。它似乎不是快捷方式链接、Python 包或数据目录的有效路径。
*import aqgFunction
import spacy
import en_core_web_sm
nlp = en_core_web_sm.load()
# Main Function
def main():
# Create AQG object
aqg = aqgFunction.AutomaticQuestionGenerator()
inputTextPath = "E:\Automatic-Question-Generator-master\Automatic-Question-Generator-master\AutomaticQuestionGenerator\DB\db.txt"
readFile = open(inputTextPath, 'r+', encoding="utf8")
#readFile = open(inputTextPath, 'r+', encoding="utf8", errors = 'ignore')
inputText = readFile.read()
#inputText = '''I am Dipta. I love codding. I build my carrier with this.'''
questionList = aqg.aqgParse(inputText) …Run Code Online (Sandbox Code Playgroud) 我已完成此快速入门,并创建了 Azure OpenAI 资源 + 创建了状态成功的模型部署。我还在https://oai.azure.com/中尝试过它并且它在那里工作。
但是,如果我尝试从 REST API 访问它,则会返回 404 Resource Not Found。我定义了header,并从 Playground 内部的->api-key获取了 url 和 json 。Code Viewjson
我正在执行
发布 https://raz-openai.openai.azure.com/openai/deployments/raz-model-2/completions?api-version=2022-12-01 {“提示”:“”,“max_tokens”:100 }带有 api-key 标头
我还错过了另一个步骤吗?
在 package.json 中,我添加了以下几行:
"prisma": {
"seed": "ts-node --compiler-options {\"module\":\"CommonJS\"} prisma/seed.ts"
}
Run Code Online (Sandbox Code Playgroud)
当我运行此命令时:npx prisma db seeds
输出:
运行种子命令时出错:
Error: Command failed with ENOENT: ts-node --compiler-options {"module":"CommonJS"} prisma/seed.ts
spawn ts-node ENOENT
Run Code Online (Sandbox Code Playgroud) 我遇到一个问题,无法正确导入气流模块,出现以下错误。有人可以帮我理解吗
10:39:36 ERROR: FileIngestion.test_download_file_mercury (unittest.loader._FailedTest.FileIngestion.test_download_file_mercury)
10:39:36 ----------------------------------------------------------------------
10:39:36 ImportError: Failed to import test module: FileIngestion.test_download_file_mercury
10:39:36 Traceback (most recent call last):
10:39:36 File "/opt/managed-artifacts/python/3.11.6/lib/python3.11/unittest/loader.py", line 419, in _find_test_path
10:39:36 module = self._get_module_from_name(name)
10:39:36 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10:39:36 File "/opt/managed-artifacts/python/3.11.6/lib/python3.11/unittest/loader.py", line 362, in _get_module_from_name
10:39:36 __import__(name)
10:39:36 File "/jenkins/workspace/dataaws-1417_web_proxy_migration/PythonUtils/test/FileIngestion/test_download_file_mercury.py", line 6, in <module>
10:39:36 from PythonUtils.src.FileIngestion import download_file_mercury
10:39:36 File "/jenkins/workspace/dataaws-1417_web_proxy_migration/PythonUtils/src/FileIngestion/download_file_mercury.py", line 2, in <module>
10:39:36 from PythonUtils.src.common.hooks.audit_service import AuditServiceHook
10:39:36 File "/jenkins/workspace/dataaws-1417_web_proxy_migration/PythonUtils/src/common/hooks/audit_service.py", line 6, in <module>
10:39:36 from airflow.utils.log.logging_mixin import LoggingMixin
10:39:36 …Run Code Online (Sandbox Code Playgroud) python ×8
python-3.x ×7
numpy ×2
aiohttp ×1
airflow ×1
azure ×1
azure-openai ×1
distutils ×1
dockerfile ×1
kubernetes ×1
linux ×1
next.js ×1
nlp ×1
pip ×1
prisma ×1
pycaret ×1
python-3.10 ×1
spacy ×1
text ×1
typeerror ×1
typescript ×1