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

Opt: Solving dependency conflict #2332

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

18870
Copy link
Collaborator

@18870 18870 commented Mar 5, 2023

Changes

Remove

  • cnocr
  • mxnet

Replace mxnet with mxnet-alas,which is compatible to mxnet==1.9.1
cnocr has been integrated directly into module.cnocr

Loosen

  • numpy
    • Replace np.int with int in codes
  • scipy
  • starlette
  • anyio
  • uvicorn
  • zerorpc
  • pyzmq
  • av
  • wrapt

As pip<20 cannot resolve the abi3 wheel name format, these packages will be restricted to the last available version that can be resolved by pip19. Note that the latest version also pass the test.

  • opencv-python<4.5.5
  • psutil<5.9.4
  • watchfiles<0.15
    • from uvicorn

Untested

  • adbutils==0.11.0 -> 1.2.7
  • uiautomator2==2.16.17 -> 2.16.22

bug exists / No need to change

What's new

ALAS no longer dependent on python 3.7, you can use up to python 3.11 now. See also here

How to compile requirements.txt

Upgrade pip, install pip-tools, run
pip-compile --annotation-style=line --index-url=https://pypi.org/simple --no-emit-index-url --output-file=requirements.txt --resolver=backtracking requirements-in.txt

TODO

help plz

Test run on

  • Linux / Docker
  • MacOS
  • AidLux / ARM

  • Migrate to Python 3.10 or 3.11
    You can download windows easy installer for python 3.11 here

@18870 18870 added help wanted / 大家来帮忙 A good start for newcomers to participate in installation / 安装 Installation issues labels Mar 5, 2023
@guoh064
Copy link
Contributor

guoh064 commented Apr 1, 2023

Test passed on WSL(Ubuntu), python==3.10.0.
If using python 3.11, then No matching distribution for numpy==1.21.2, and compile fails.

wsl_ubuntu_py310_output.txt
wsl_ubuntu_py311_error_log.txt

@shoucandanghehe
Copy link
Contributor

Considering introducing a more modern package management tool?
Like pdm or poetry

@18870
Copy link
Collaborator Author

18870 commented Jun 10, 2023

Considering introducing a more modern package management tool? Like pdm or poetry

This is not a package management problem, the conflict is caused by the official Windows wheel of mxnet, which limits the version of requests, etc, then prevents us from upgrading other packages and python version.

@shoucandanghehe
Copy link
Contributor

This is not a package management problem

I know, it's just that I think they could improve the development experience a bit.
It would also make it easier to specify different dependencies for different python versions.
So I made this suggestion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted / 大家来帮忙 A good start for newcomers to participate in installation / 安装 Installation issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants