TheFunny / ArisuAutoSweeper

蔚蓝档案脚本 | Blue Archive Auto Script | WIP
GNU General Public License v3.0
205 stars 12 forks source link

Dev branch: Installing Requirements and Running GUI #16

Closed ChikyuTenshi closed 9 months ago

ChikyuTenshi commented 9 months ago

@RedDeadDepresso Hey, apologies in advance but these are the issues I'm having at the moment, almost certain it's on my end

C:\Users\zoey\Desktop\ArisuAutoSweeper-dev>pip install -r requirements-in.txt Collecting numpy (from -r requirements-in.txt (line 2)) Obtaining dependency information for numpy from https://files.pythonhosted.org/packages/ad/11/52fbe97fd84c91105b651d25a122f8deed6d3519afb14f9771fac1c9b7de/numpy-1.26.3-cp312-cp312-win_amd64.whl.metadata Using cached numpy-1.26.3-cp312-cp312-win_amd64.whl.metadata (61 kB) Collecting scipy (from -r requirements-in.txt (line 3)) Obtaining dependency information for scipy from https://files.pythonhosted.org/packages/c6/a1/357e4cd43af2748e1e0407ae0e9a5ea8aaaa6b702833c81be11670dcbad8/scipy-1.11.4-cp312-cp312-win_amd64.whl.metadata Using cached scipy-1.11.4-cp312-cp312-win_amd64.whl.metadata (60 kB) Collecting pillow (from -r requirements-in.txt (line 4)) Obtaining dependency information for pillow from https://files.pythonhosted.org/packages/51/07/7e9266a59bb267b56c1f432f6416653b9a78dda771c57740d064a8aa2a44/pillow-10.2.0-cp312-cp312-win_amd64.whl.metadata Using cached pillow-10.2.0-cp312-cp312-win_amd64.whl.metadata (9.9 kB) Collecting opencv-python (from -r requirements-in.txt (line 5)) Obtaining dependency information for opencv-python from https://files.pythonhosted.org/packages/c7/ec/9dabb6a9abfdebb3c45b0cc52dec901caafef2b2c7e7d6a839ed86d81e91/opencv_python-4.9.0.80-cp37-abi3-win_amd64.whl.metadata Using cached opencv_python-4.9.0.80-cp37-abi3-win_amd64.whl.metadata (20 kB) Collecting adbutils (from -r requirements-in.txt (line 8)) Obtaining dependency information for adbutils from https://files.pythonhosted.org/packages/07/db/c6919c8fd69c254144554b0239b5d6d7392282f6794b34cb2611a6c6429e/adbutils-2.1.0-py3-none-win_amd64.whl.metadata Using cached adbutils-2.1.0-py3-none-win_amd64.whl.metadata (914 bytes) Collecting uiautomator2==2.16.17 (from -r requirements-in.txt (line 9)) Using cached uiautomator2-2.16.17-py3-none-any.whl (3.1 MB) Collecting uiautomator2cache==0.3.0.1 (from -r requirements-in.txt (line 10)) Using cached uiautomator2cache-0.3.0.1-py3-none-any.whl (12.9 MB) Collecting wrapt>=1.14.0 (from -r requirements-in.txt (line 11)) Obtaining dependency information for wrapt>=1.14.0 from https://files.pythonhosted.org/packages/5c/cc/8297f9658506b224aa4bd71906447dea6bb0ba629861a758c28f67428b91/wrapt-1.16.0-cp312-cp312-win_amd64.whl.metadata Using cached wrapt-1.16.0-cp312-cp312-win_amd64.whl.metadata (6.8 kB) Collecting lz4 (from -r requirements-in.txt (line 12)) Obtaining dependency information for lz4 from https://files.pythonhosted.org/packages/c4/5d/7b70965a0692de29af2af1007fe837f46fd456bbe2aa8f838a8543a3b5cb/lz4-4.3.3-cp312-cp312-win_amd64.whl.metadata Using cached lz4-4.3.3-cp312-cp312-win_amd64.whl.metadata (3.8 kB) Collecting av==10.0.0 (from -r requirements-in.txt (line 13)) Using cached av-10.0.0.tar.gz (2.4 MB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [74 lines of output] Compiling av\buffer.pyx because it changed. [1/1] Cythonizing av\buffer.pyx Compiling av\bytesource.pyx because it changed. [1/1] Cythonizing av\bytesource.pyx Compiling av\descriptor.pyx because it changed. [1/1] Cythonizing av\descriptor.pyx Compiling av\dictionary.pyx because it changed. [1/1] Cythonizing av\dictionary.pyx Compiling av\enum.pyx because it changed. [1/1] Cythonizing av\enum.pyx Compiling av\error.pyx because it changed. [1/1] Cythonizing av\error.pyx Compiling av\format.pyx because it changed. [1/1] Cythonizing av\format.pyx Compiling av\frame.pyx because it changed. [1/1] Cythonizing av\frame.pyx performance hint: av\logging.pyx:232:5: Exception check on 'log_callback' will always require the GIL to be acquired. Possible solutions:

  1. Declare 'log_callback' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
  2. Use an 'int' return type on 'log_callback' to allow an error code to be returned.

    Error compiling Cython file:

    ... cdef const char log_context_name(void ptr) nogil: cdef log_context obj = <log_context>ptr return obj.name

    cdef lib.AVClass log_class log_class.item_name = log_context_name ^

    av\logging.pyx:216:22: Cannot assign type 'const char (void ) except? NULL nogil' to 'const char ()(void ) noexcept nogil'. Exception values are incompatible. Suggest adding 'noexcept' to type 'const char (void *) except? NULL nogil'.

    Error compiling Cython file:

    ...

    Start the magic!

    We allow the user to fully disable the logging system as it will not play

    nicely with subinterpreters due to FFmpeg-created threads.

    if os.environ.get('PYAV_LOGGING') != 'off': lib.av_log_set_callback(log_callback) ^

    av\logging.pyx:351:28: Cannot assign type 'void (void , int, const char , va_list) except nogil' to 'av_log_callback'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (void , int, const char , va_list) except nogil'. Compiling av\logging.pyx because it changed. [1/1] Cythonizing av\logging.pyx Traceback (most recent call last): File "C:\Users\zoey\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in main() File "C:\Users\zoey\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main json_out['return_val'] = hook(*hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zoey\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zoey\AppData\Local\Temp\pip-build-env-dx_t_4xm\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zoey\AppData\Local\Temp\pip-build-env-dx_t_4xm\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires self.run_setup() File "C:\Users\zoey\AppData\Local\Temp\pip-build-env-dx_t_4xm\overlay\Lib\site-packages\setuptools\build_meta.py", line 480, in run_setup super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script) File "C:\Users\zoey\AppData\Local\Temp\pip-build-env-dx_t_4xm\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup exec(code, locals()) File "", line 157, in File "C:\Users\zoey\AppData\Local\Temp\pip-build-env-dx_t_4xm\overlay\Lib\site-packages\Cython\Build\Dependencies.py", line 1154, in cythonize cythonize_one(args) File "C:\Users\zoey\AppData\Local\Temp\pip-build-env-dx_t_4xm\overlay\Lib\site-packages\Cython\Build\Dependencies.py", line 1321, in cythonize_one raise CompileError(None, pyx_file) Cython.Compiler.Errors.CompileError: av\logging.pyx [end of output]

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

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

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

[notice] A new release of pip is available: 23.2.1 -> 23.3.2 [notice] To update, run: python.exe -m pip install --upgrade pip

C:\Users\zoey\Desktop\ArisuAutoSweeper-dev>python gui.py Traceback (most recent call last): File "C:\Users\zoey\Desktop\ArisuAutoSweeper-dev\gui.py", line 4, in from module.logger import logger File "C:\Users\zoey\Desktop\ArisuAutoSweeper-dev\module\logger__init__.py", line 1, in from .logger import logger File "C:\Users\zoey\Desktop\ArisuAutoSweeper-dev\module\logger\logger.py", line 7, in from rich.console import Console, ConsoleOptions, ConsoleRenderable, NewLine ModuleNotFoundError: No module named 'rich'

C:\Users\zoey\Desktop\ArisuAutoSweeper-dev>

RedDeadDepresso commented 9 months ago

Maybe you can try:

  1. running cmd as administrator
  2. type cd your_path_to_AAS
  3. type pip install -r requirements-in.txt

If this doesn't work replace step 3 with pip install -r requirements.txt

TheFunny commented 9 months ago

The problem you encountered seems like you have failed to install all the modules required. I wonder which version of python you are using because the script is only guaranteed to be running successfully on Python 3.10. Also you may try again with requirement.txt . If you just want to use the dev branch rather than developing, you can use the released file and change the branch setting in config/deploy.yaml.

RedDeadDepresso commented 9 months ago

You can follow the manual installation of this guide https://github.com/LmeSzinc/StarRailCopilot/wiki/Installation_en#manual-installation-tutorial Here they are creating a Python 3.10.10 environment using conda and this may solve the problem.

ChikyuTenshi commented 9 months ago

@TheFunny Alright I was running Python 3.12 but after I switched to 3.10 it started downloading all the modules as expected and ran the gui.py properly, I also tried changing the branch as you suggested and that seems to be working too as it pulled the update from @RedDeadDepresso's dev branch so that seems to be a viable solution as well, Thank you all for taking your time to sort this out