Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

volcengine 库装不上 #25

Open
Jerry-Kon opened this issue Jan 3, 2024 · 7 comments
Open

volcengine 库装不上 #25

Jerry-Kon opened this issue Jan 3, 2024 · 7 comments

Comments

@Jerry-Kon
Copy link

使用命令:pip install --user volcengine
系统:windows
anaconda环境:python=3.10

报错:
Collecting volcengine
Using cached volcengine-1.0.121.tar.gz (276 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: requests>=2.25.1 in d:\anaconda\envs\env_1\lib\site-packages (from volcengine) (2.31.0)
Collecting retry==0.9.2 (from volcengine)
Using cached retry-0.9.2-py2.py3-none-any.whl (8.0 kB)
Collecting pytz==2020.5 (from volcengine)
Using cached pytz-2020.5-py2.py3-none-any.whl (510 kB)
Collecting pycryptodome==3.9.9 (from volcengine)
Using cached pycryptodome-3.9.9.tar.gz (15.5 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [21 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\junyangkong\AppData\Local\Temp\pip-install-q_a1sc4l\pycryptodome_f73fd9af7b444677b08f8dc0fbd21299\setup.py", line 457, in
set_compiler_options(package_root, ext_modules)
File "C:\Users\junyangkong\AppData\Local\Temp\pip-install-q_a1sc4l\pycryptodome_f73fd9af7b444677b08f8dc0fbd21299\compiler_opt.py", line 341, in set_compiler_options
clang = compiler_is_clang()
File "C:\Users\junyangkong\AppData\Local\Temp\pip-install-q_a1sc4l\pycryptodome_f73fd9af7b444677b08f8dc0fbd21299\compiler_opt.py", line 251, in compiler_is_clang
return test_compilation(source, msg="clang")
File "C:\Users\junyangkong\AppData\Local\Temp\pip-install-q_a1sc4l\pycryptodome_f73fd9af7b444677b08f8dc0fbd21299\compiler_opt.py", line 82, in test_compilation
objects = compiler.compile([fname], extra_postargs=extra_cc_options)
File "D:\anaconda\envs\env_1\lib\site-packages\setuptools_distutils_msvccompiler.py", line 343, in compile
self.initialize()
File "D:\anaconda\envs\env_1\lib\site-packages\setuptools_distutils_msvccompiler.py", line 253, in initialize
vc_env = _get_vc_env(plat_spec)
File "D:\anaconda\envs\env_1\lib\site-packages\setuptools\msvc.py", line 233, in msvc14_get_vc_env
return _msvc14_get_vc_env(plat_spec)
File "D:\anaconda\envs\env_1\lib\site-packages\setuptools\msvc.py", line 190, in _msvc14_get_vc_env
raise distutils.errors.DistutilsPlatformError("Unable to find vcvarsall.bat")
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
Testing support for clang
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

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

@zhwentao
Copy link

+1

@Eieth
Copy link

Eieth commented Feb 5, 2024

我把python换3.7.9,安装了ms的运行库就装上了

@Springrx
Copy link

+1, 请问解决了吗

@bllli
Copy link

bllli commented Feb 27, 2024

解决了, 就是解决方案比较蠢

在 Docker python3.10-slim 中 volcengine 安装时报错, 其依赖 pycryptodome 显示 gcc 相关错误
调研发现 pycryptodome==3.19.0 不会报错, volcengine 依赖的 pycryptodome==3.9.9 会报错

修改方案是手动为 volcengine 安装依赖

  1. 安装 pycryptodome==3.19.0
  2. 拷贝出 volcengine 的 requirement.txt, 然后删掉 pycryptodome==3.9.9, 安装其余的依赖
  3. 用 pip3 install --no-deps volcengine==1.0.111 忽略其依赖, 这样能够避免再安装 pycryptodome==3.9.9

Dockerfile 片段

COPY .devops/requirement-deps.txt /app  
RUN pip3 install pycryptodome==3.19.0 && pip3 install -r requirement-deps.txt && pip3 install --no-deps volcengine==1.0.111 && pip cache purge

还是请官方试一下 volcengine 与各 python 版本的兼容性吧

@bllli
Copy link

bllli commented Feb 27, 2024

+1, 请问解决了吗

@Springrx 我有个解决方案了, 可以看下本 issue 中我的回答

@bllli
Copy link

bllli commented Apr 22, 2024

不介意用旧版本的话, 这样也行

pycryptodome==3.20.0
volcengine==1.0.98

@ZhuoranLyu
Copy link

服了 连个这也做不好 不知道字节天天干啥吃的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants