yihong0618 / Kindle_download_helper

Download all your kindle books script.
GNU General Public License v3.0
2.63k stars 215 forks source link

无法安装requirements(进程占用) #164

Closed ChenhaoranY closed 7 months ago

ChenhaoranY commented 7 months ago
(amazon) D:\ychr_code\git_software\Kindle_download_helper>pip3 install -r requirements.txt
Collecting requests (from -r requirements.txt (line 1))
  Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Collecting browser-cookie3 (from -r requirements.txt (line 2))
  Using cached browser_cookie3-0.19.1-py3-none-any.whl.metadata (632 bytes)
Collecting mobi (from -r requirements.txt (line 3))
  Using cached mobi-0.3.3.tar.gz (90 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting amazon.ion (from -r requirements.txt (line 4))
  Using cached amazon.ion-0.12.0.tar.gz (674 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [130 lines of output]
      git version 2.43.0.windows.1
      cmake version 3.20.2

      CMake suite maintained and supported by Kitware (kitware.com/cmake).
      Cloning into 'ion-c'...
      Submodule 'deps/google-test' (https://github.com/google/googletest.git) registered for path 'deps/google-test'
      Submodule 'ion-tests' (https://github.com/amazon-ion/ion-tests.git) registered for path 'ion-tests'
      Submodule 'tools/ion-bench/deps/google-benchmark' (https://github.com/google/benchmark.git) registered for path 'tools/ion-bench/deps/google-benchmark'
      Submodule 'tools/ion-bench/deps/json-c' (https://github.com/json-c/json-c.git) registered for path 'tools/ion-bench/deps/json-c'
      Submodule 'tools/ion-bench/deps/libcbor' (https://github.com/PJK/libcbor.git) registered for path 'tools/ion-bench/deps/libcbor'
      Submodule 'tools/ion-bench/deps/msgpack-c' (https://github.com/msgpack/msgpack-c.git) registered for path 'tools/ion-bench/deps/msgpack-c'
      Submodule 'tools/ion-bench/deps/yyjson' (https://github.com/ibireme/yyjson.git) registered for path 'tools/ion-bench/deps/yyjson'
      Cloning into 'C:/Users/10537/AppData/Local/Temp/pip-install-ai8s_y5e/amazon-ion_ae6e5fe003874e8da09b2715ea723578/ion-c/deps/google-test'...
      Cloning into 'C:/Users/10537/AppData/Local/Temp/pip-install-ai8s_y5e/amazon-ion_ae6e5fe003874e8da09b2715ea723578/ion-c/ion-tests'...
      Cloning into 'C:/Users/10537/AppData/Local/Temp/pip-install-ai8s_y5e/amazon-ion_ae6e5fe003874e8da09b2715ea723578/ion-c/tools/ion-bench/deps/google-benchmark'...
      Cloning into 'C:/Users/10537/AppData/Local/Temp/pip-install-ai8s_y5e/amazon-ion_ae6e5fe003874e8da09b2715ea723578/ion-c/tools/ion-bench/deps/json-c'...
      Cloning into 'C:/Users/10537/AppData/Local/Temp/pip-install-ai8s_y5e/amazon-ion_ae6e5fe003874e8da09b2715ea723578/ion-c/tools/ion-bench/deps/libcbor'...
      Cloning into 'C:/Users/10537/AppData/Local/Temp/pip-install-ai8s_y5e/amazon-ion_ae6e5fe003874e8da09b2715ea723578/ion-c/tools/ion-bench/deps/msgpack-c'...
      Cloning into 'C:/Users/10537/AppData/Local/Temp/pip-install-ai8s_y5e/amazon-ion_ae6e5fe003874e8da09b2715ea723578/ion-c/tools/ion-bench/deps/yyjson'...
      Submodule path 'deps/google-test': checked out '783d00fd19865fcbc3065e3fb3e17144761fcf5a'
      Submodule path 'ion-tests': checked out 'b6b52537bff275045531463443bb89bd1e15ee7b'
      Submodule path 'tools/ion-bench/deps/google-benchmark': checked out 'b177433f3ee2513b1075140c723d73ab8901790f'
      Submodule path 'tools/ion-bench/deps/json-c': checked out 'd0f32a5a43d1b9dc0b2cd6af310e5f09b97c3423'
      Submodule path 'tools/ion-bench/deps/libcbor': checked out '8fba9a6fb36cae03539e4f6e15c22e60ced52fb3'
      Submodule 'doxygen-theme' (https://github.com/nnen/doxygen-theme.git) registered for path 'tools/ion-bench/deps/libcbor/doxygen-theme'
      Cloning into 'C:/Users/10537/AppData/Local/Temp/pip-install-ai8s_y5e/amazon-ion_ae6e5fe003874e8da09b2715ea723578/ion-c/tools/ion-bench/deps/libcbor/doxygen-theme'...
      Submodule path 'tools/ion-bench/deps/libcbor/doxygen-theme': checked out '46111c61a9f49b7a9886127e679d4317478fab1c'
      Submodule path 'tools/ion-bench/deps/msgpack-c': checked out 'cd67366b7f598c178cfbe0382274ff3f2bb90cac'
      Submodule path 'tools/ion-bench/deps/yyjson': checked out '4950308edb2e1c722f475635176e901656646520'
      CMake Error: Could not create named generator Visual Studio 17 2022

      Generators
        Visual Studio 16 2019        = Generates Visual Studio 2019 project files.
                                       Use -A option to specify architecture.
        Visual Studio 15 2017 [arch] = Generates Visual Studio 2017 project files.
                                       Optional [arch] can be "Win64" or "ARM".
        Visual Studio 14 2015 [arch] = Generates Visual Studio 2015 project files.
                                       Optional [arch] can be "Win64" or "ARM".
        Visual Studio 12 2013 [arch] = Generates Visual Studio 2013 project files.
                                       Optional [arch] can be "Win64" or "ARM".
        Visual Studio 11 2012 [arch] = Generates Visual Studio 2012 project files.
                                       Optional [arch] can be "Win64" or "ARM".
        Visual Studio 10 2010 [arch] = Generates Visual Studio 2010 project files.
                                       Optional [arch] can be "Win64" or "IA64".
        Visual Studio 9 2008 [arch]  = Generates Visual Studio 2008 project files.
                                       Optional [arch] can be "Win64" or "IA64".
        Borland Makefiles            = Generates Borland makefiles.
      * NMake Makefiles              = Generates NMake makefiles.
        NMake Makefiles JOM          = Generates JOM makefiles.
        MSYS Makefiles               = Generates MSYS makefiles.
        MinGW Makefiles              = Generates a make file for use with
                                       mingw32-make.
        Green Hills MULTI            = Generates Green Hills MULTI files
                                       (experimental, work-in-progress).
        Unix Makefiles               = Generates standard UNIX makefiles.
        Ninja                        = Generates build.ninja files.
        Ninja Multi-Config           = Generates build-<Config>.ninja files.
        Watcom WMake                 = Generates Watcom WMake makefiles.
        CodeBlocks - MinGW Makefiles = Generates CodeBlocks project files.
        CodeBlocks - NMake Makefiles = Generates CodeBlocks project files.
        CodeBlocks - NMake Makefiles JOM
                                     = Generates CodeBlocks project files.
        CodeBlocks - Ninja           = Generates CodeBlocks project files.
        CodeBlocks - Unix Makefiles  = Generates CodeBlocks project files.
        CodeLite - MinGW Makefiles   = Generates CodeLite project files.
        CodeLite - NMake Makefiles   = Generates CodeLite project files.
        CodeLite - Ninja             = Generates CodeLite project files.
        CodeLite - Unix Makefiles    = Generates CodeLite project files.
        Eclipse CDT4 - NMake Makefiles
                                     = Generates Eclipse CDT 4.0 project files.
        Eclipse CDT4 - MinGW Makefiles
                                     = Generates Eclipse CDT 4.0 project files.
        Eclipse CDT4 - Ninja         = Generates Eclipse CDT 4.0 project files.
        Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files.
        Kate - MinGW Makefiles       = Generates Kate project files.
        Kate - NMake Makefiles       = Generates Kate project files.
        Kate - Ninja                 = Generates Kate project files.
        Kate - Unix Makefiles        = Generates Kate project files.
        Sublime Text 2 - MinGW Makefiles
                                     = Generates Sublime Text 2 project files.
        Sublime Text 2 - NMake Makefiles
                                     = Generates Sublime Text 2 project files.
        Sublime Text 2 - Ninja       = Generates Sublime Text 2 project files.
        Sublime Text 2 - Unix Makefiles
                                     = Generates Sublime Text 2 project files.

      CMake Warning:
        No source or binary directory provided.  Both will be assumed to be the
        same as the current working directory, but note that this warning will
        become a fatal error in future CMake releases.

      Traceback (most recent call last):
        File "C:\Users\10537\AppData\Local\Temp\pip-install-ai8s_y5e\amazon-ion_ae6e5fe003874e8da09b2715ea723578\install.py", line 96, in _download_ionc
          _build_ionc()
        File "C:\Users\10537\AppData\Local\Temp\pip-install-ai8s_y5e\amazon-ion_ae6e5fe003874e8da09b2715ea723578\install.py", line 109, in _build_ionc
          _build_ionc_win()
        File "C:\Users\10537\AppData\Local\Temp\pip-install-ai8s_y5e\amazon-ion_ae6e5fe003874e8da09b2715ea723578\install.py", line 127, in _build_ionc_win
          check_call('cmake -G \"Visual Studio 17 2022\"')
        File "D:\ProgramData\Anaconda3\envs\amazon\lib\subprocess.py", line 364, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command 'cmake -G "Visual Studio 17 2022"' returned non-zero exit status 1.

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "D:\ProgramData\Anaconda3\envs\amazon\lib\shutil.py", line 620, in _rmtree_unsafe
          os.rmdir(path)
      PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'C:\\Users\\10537\\AppData\\Local\\Temp\\pip-install-ai8s_y5e\\amazon-ion_ae6e5fe003874e8da09b2715ea723578\\ion-c'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\10537\AppData\Local\Temp\pip-install-ai8s_y5e\amazon-ion_ae6e5fe003874e8da09b2715ea723578\setup.py", line 72, in <module>
          run_setup()
        File "C:\Users\10537\AppData\Local\Temp\pip-install-ai8s_y5e\amazon-ion_ae6e5fe003874e8da09b2715ea723578\setup.py", line 23, in run_setup
          if C_EXT and _install_ionc():
        File "C:\Users\10537\AppData\Local\Temp\pip-install-ai8s_y5e\amazon-ion_ae6e5fe003874e8da09b2715ea723578\install.py", line 197, in _install_ionc
          if not _download_ionc():
        File "C:\Users\10537\AppData\Local\Temp\pip-install-ai8s_y5e\amazon-ion_ae6e5fe003874e8da09b2715ea723578\install.py", line 102, in _download_ionc
          shutil.rmtree(_IONC_DIR, onerror=readonly_handler)
        File "D:\ProgramData\Anaconda3\envs\amazon\lib\shutil.py", line 740, in rmtree
          return _rmtree_unsafe(path, onerror)
        File "D:\ProgramData\Anaconda3\envs\amazon\lib\shutil.py", line 622, in _rmtree_unsafe
          onerror(os.rmdir, path, sys.exc_info())
        File "C:\Users\10537\AppData\Local\Temp\pip-install-ai8s_y5e\amazon-ion_ae6e5fe003874e8da09b2715ea723578\install.py", line 77, in readonly_handler
          func(path)
      PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'C:\\Users\\10537\\AppData\\Local\\Temp\\pip-install-ai8s_y5e\\amazon-ion_ae6e5fe003874e8da09b2715ea723578\\ion-c'
      [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.

(amazon) D:\ychr_code\git_software\Kindle_download_helper>cmake --version
cmake version 3.20.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).
yihong0618 commented 7 months ago

python 版本?用 3.10 试试

ChenhaoranY commented 7 months ago

已经重新安装3.10 的python。目前遇到的是这个问题。 我参考了ERROR - 404 Client Error: Not Found for url: https://www.amazon.cn/error 目前尝试重置密码后还是不行。


(a1) D:\ychr_code\git_software\Kindle_download_helper>python no_kindle.py -e ${xxx@berkeley.edu} -p ${xxx} --jp
Authenticating . . .
{"response": {"challenge": {"challenge_reason": "InvalidAuthenticationData", "uri": "https://www.amazon.co.jp/ap/challenge?arb=8b8c0126-e289-4f51-b780-18a05a76763d", "required_authentication_method": "GenericClaimPassword"}}, "request_id": "355c10376445435f817eac25aaf719d0"}
Could not retrieve auth tokens
Traceback (most recent call last):
  File "D:\ychr_code\git_software\Kindle_download_helper\no_kindle.py", line 5, in <module>
    no_main()
  File "D:\ychr_code\git_software\Kindle_download_helper\kindle_download_helper\no_cli.py", line 126, in no_main
    nk.make_library()
  File "D:\ychr_code\git_software\Kindle_download_helper\kindle_download_helper\no_kindle.py", line 167, in make_library
    r = self.session.send(
  File "D:\ychr_code\git_software\Kindle_download_helper\kindle_download_helper\no_kindle.py", line 45, in new_send
    return old_send(*args, **kwargs)
  File "D:\ProgramData\Anaconda3\envs\a1\lib\site-packages\requests\sessions.py", line 684, in send
    kwargs["proxies"] = resolve_proxies(request, self.proxies, self.trust_env)
  File "D:\ProgramData\Anaconda3\envs\a1\lib\site-packages\requests\utils.py", line 874, in resolve_proxies
    url = request.url
AttributeError: 'NoneType' object has no attribute 'url'

(a1) D:\ychr_code\git_software\Kindle_download_helper>python no_kindle.py -e ${xxx@berkeley.edu} -p ${xxx} --jp
Authenticating . . .
{"response": {"challenge": {"challenge_reason": "InvalidAuthenticationData", "uri": "https://www.amazon.co.jp/ap/challenge?arb=9d39fb25-e1e4-4992-ab5b-cfb28d32aaa4", "required_authentication_method": "GenericClaimPassword"}}, "request_id": "75d07de9adac4b9f9aadc0247150b42d"}
Could not retrieve auth tokens
Traceback (most recent call last):
  File "D:\ychr_code\git_software\Kindle_download_helper\no_kindle.py", line 5, in <module>
    no_main()
  File "D:\ychr_code\git_software\Kindle_download_helper\kindle_download_helper\no_cli.py", line 126, in no_main
    nk.make_library()
  File "D:\ychr_code\git_software\Kindle_download_helper\kindle_download_helper\no_kindle.py", line 167, in make_library
    r = self.session.send(
  File "D:\ychr_code\git_software\Kindle_download_helper\kindle_download_helper\no_kindle.py", line 45, in new_send
    return old_send(*args, **kwargs)
  File "D:\ProgramData\Anaconda3\envs\a1\lib\site-packages\requests\sessions.py", line 684, in send
    kwargs["proxies"] = resolve_proxies(request, self.proxies, self.trust_env)
  File "D:\ProgramData\Anaconda3\envs\a1\lib\site-packages\requests\utils.py", line 874, in resolve_proxies
    url = request.url
AttributeError: 'NoneType' object has no attribute 'url'

(a1) D:\ychr_code\git_software\Kindle_download_helper>rm .tokens .device_id
'rm' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

(a1) D:\ychr_code\git_software\Kindle_download_helper>del .tokens .device_id

(a1) D:\ychr_code\git_software\Kindle_download_helper>python no_kindle.py -e ${xxx@berkeley.edu} -p ${xxx} --jp
Authenticating . . .
{"response": {"challenge": {"challenge_reason": "InvalidAuthenticationData", "uri": "https://www.amazon.co.jp/ap/challenge?arb=f6e8d069-e659-469d-9817-9978f367717c", "required_authentication_method": "GenericClaimPassword"}}, "request_id": "131691e22b36465aa37e8617d1a07ccf"}
Could not retrieve auth tokens
Traceback (most recent call last):
  File "D:\ychr_code\git_software\Kindle_download_helper\no_kindle.py", line 5, in <module>
    no_main()
  File "D:\ychr_code\git_software\Kindle_download_helper\kindle_download_helper\no_cli.py", line 126, in no_main
    nk.make_library()
  File "D:\ychr_code\git_software\Kindle_download_helper\kindle_download_helper\no_kindle.py", line 167, in make_library
    r = self.session.send(
  File "D:\ychr_code\git_software\Kindle_download_helper\kindle_download_helper\no_kindle.py", line 45, in new_send
    return old_send(*args, **kwargs)
  File "D:\ProgramData\Anaconda3\envs\a1\lib\site-packages\requests\sessions.py", line 684, in send
    kwargs["proxies"] = resolve_proxies(request, self.proxies, self.trust_env)
  File "D:\ProgramData\Anaconda3\envs\a1\lib\site-packages\requests\utils.py", line 874, in resolve_proxies
    url = request.url
AttributeError: 'NoneType' object has no attribute 'url'
yihong0618 commented 7 months ago

重制密码不行,里面有个安全的你点进去然后会让你输入密码,你再试试如果不行就是进入风控了,很难了

yihong0618 commented 7 months ago

@ChenhaoranY FYI @VermiIIi0n 这个朋友日亚成功了,不知道有啥解决方案没 https://github.com/yihong0618/Kindle_download_helper/pull/158

ChenhaoranY commented 7 months ago

好的,看看这个老哥有没有什么办法。看他的主页,他跟我想干的事情挺像的

VermiIIi0n commented 7 months ago

氦抱歉陈兄,我可能帮不上忙,我当时没遇到啥鉴权阻碍,你有试过日本代理吗?最好是原生IP的。

ChenhaoranY commented 7 months ago

我现在在美国,国内的VPN都用不了。我找找看怎么使用日本ip。非常感谢。 看了你的主页,感觉项目很棒!

ChenhaoranY commented 7 months ago

image 我在美亚买了本书,还是遇到这个问题。。。。 有点奇怪。。。。 我都怀疑是不是我账号密码输错了

yihong0618 commented 7 months ago

是的 -饿后面没有 ${} 这个只放账号密码,这个的意思是变量

ChenhaoranY commented 7 months ago

大哥……你是我的神!!!我是傻瓜o(╥﹏╥)o image 成功下载了!不管是美亚还是日亚! 非常感谢您的指导! image 这个warning应该是没关系的吧? 以及这个图片会因为解码被压缩是吗?

yihong0618 commented 7 months ago

大哥……你是我的神!!!我是傻瓜o(╥﹏╥)o image 成功下载了!不管是美亚还是日亚! 非常感谢您的指导! image 这个warning应该是没关系的吧? 以及这个图片会因为解码被压缩是吗?

warning 来自上游,你可以忽略。

yihong0618 commented 7 months ago

fix 了谢谢