Closed Naming-isDifficult closed 2 months ago
English ver.
Cuz I don't have access to sudo
, I have to manually install Alas on my Linux machine. However, it seems that it is impossible to resolve some conflicts between dependencies.
Suppose cwd = "./AzurLaneAutoScript"
, one could run the following commands:
conda clean -a
conda create -n alas python==3.7.6
conda activate alas
pip cache purge
pip install -r requirements.txt
ERROR: Cannot install -r requirements.txt (line 32), -r requirements.txt (line 48), -r requirements.txt (line 8) and requests==2.18.4 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested requests==2.18.4
adbutils 0.11.0 depends on requests
gluoncv 0.6.0 depends on requests
mxnet 1.6.0 depends on requests<3 and >=2.20.0
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
OS: Ubuntu 22.04.4 LTS x86_64
Kernel: 6.8.0-40-generic
CPU: 13th Gen Intel i5-13600KF
GPU: Nvidia RTX 4070 super
Memory: 32GB
Anaconda version: 24.5.0
FIY, I removed pywin32
from requirements.txt
cuz Linux does not support Windows API. Additionally, Pypl only provides wheels built for Windows, and even if the source code is provided, I doubt if I can compile it on Linux.
一个可行的解决方案是把requirements.txt
中requests==2.18.4
改成requests==2.20.0
,至少能安装能跑。理论上应该可以稳定运行但我不确定,我不是很熟悉request
库。
A possible resolution is to change requests==2.18.4
into requests==2.20.0
. At least you will be able to install all dependencies and run the application. It should be stable, I believe, but I'm not 100% sure. I'm not familiar with request
.
用requirements-in.txt试试。
用requirements-in.txt试试。
试了一下确实可以,但相对的requests
版本来到了2.31.0
,别的依赖也有很多版本和requirements.txt
中要求的不符,可以理解成alas
对依赖的版本的限制没有那么死吗?requirements.txt
中基本都是用==
规定版本
我的理解,因为windows和非windows上有区别,所以库的选取也不一样。至于怎么理解可能只能问开发者了
使用 ./deploy/docker/requirements.txt,同级目录下也有 dockerfile
使用 ./deploy/docker/requirements.txt,同级目录下也有 dockerfile
好的,感谢。
另外如果这样的话wiki中安装部分是否需要更新?Linux相关的部分还是
pip install -r requirements.txt
而实际上应该是
pip install -r ./deploy/docker/requirements.txt
或
pip install -r requirements-in.txt
注:
我用diff
看了一下这俩几乎一样,除了requirements-in.txt
还多一个alas-webapp
以及./deploy/docker/requirements.txt
中使用的是opencv-python-headless
,我大致翻看了一下GUI相关的代码,至少目前没看到需要调用和GUI相关的opencv
方法,暂且认为这俩可以互换
我个人没用过github的wiki不太敢自己上手折腾就是()
我这边也没更多别的问题了,就先把issue关闭了()
在提问之前...
描述你的问题
我个人由于没有sudo权限,无法使用docker安装alas,在尝试手动安装环境时出现了依赖冲突无法解决的问题
如何复现
运行的命令如下,假定
cwd == "./AzurLaneAutoScript"
预期行为
相关 Logs
No response
截图
No response
还有别的吗?
另外,我手动从
requirements.txt
中移除了pywin32
,因为Linux本身不支持Windows API并且Pypl也只提供了Windows版wheel,我个人也相信即便提供了源码供编译Linux上也无法编译成功