wiki:jazz/20-04-25

2020-04-25

Scoop

  • https://www.kittell.net/code/powershell-unix-sed-equivalent-change-text-file/
    {
        "version": "3.8.2",
        "homepage": "https://www.python.org/",
        "description": "A programming language that lets you work quickly and integrate systems more effectively.",
        "license": "Python-2.0",
        "architecture": {
            "64bit": {
                "url": [
                    "https://www.python.org/ftp/python/3.8.2/python-3.8.2-embed-amd64.zip",
                    "https://bootstrap.pypa.io/get-pip.py"
                ],
                "hash": [
                    "2927a3a6d0fe1f6e047a86059220aeda374eed23113b9ef5355acb8452d56453",
                    "421ac1d44c0cf9730a088e337867d974b91bdce4ea2636099275071878cc189e"
                ]
            },
            "32bit": {
                "url": [
                    "https://www.python.org/ftp/python/3.8.2/python-3.8.2-embed-win32.zip",
                    "https://bootstrap.pypa.io/get-pip.py"
                ],
                "hash": [
                    "3fefc09b640bb6bd1d91f9c3a63e314fb19d29603c1194db528b58efafbcbadb",
                    "421ac1d44c0cf9730a088e337867d974b91bdce4ea2636099275071878cc189e"
                ]
            }
        },
        "post_install": [
            "(Get-Content \"$dir\\python38._pth\").replace(\"#import site\",\"import site\") | Set-Content \"$dir\\python38._pth\"",
            "python \"$dir\\get-pip.py\""
        ],
        "bin": [
            "python.exe",
            "pythonw.exe",
            [
                "python.exe",
                "python3"
            ]
        ],
        "env_add_path": [
            "Scripts",
            "."
        ]
    }
    
  • 看樣子如果官方網站的檔案有異動,就容易造成 scoop app manifast 無法安裝
    λ scoop install gradle                                                                                                                                                           
    Installing 'gradle' (6.3) [64bit]                                                                                                                                                
    gradle-6.3-all.zip (138.4 MB) [=========================================================================================================================================] 100%   
    Checking hash of gradle-6.3-all.zip ... ERROR Hash check failed!                                                                                                                 
    App:         main/gradle                                                                                                                                                         
    URL:         https://services.gradle.org/distributions/gradle-6.3-all.zip                                                                                                        
    First bytes: 50 4B 03 04 0A 00 00 08                                                                                                                                             
    Expected:    0f316a67b971b7b571dac7215dcf2591a30994b3450e0629925ffcfe2c68cc5c                                                                                                    
    Actual:      712f7a3c6bf6246296d7d1f751c515f79dd2caf9ae0b07dd46dddea2c2173263                                                                                                    
                                                                                                                                                                                     
    Please try again or create a new issue by using the following link and paste your console output:                                                                                
    https:////                                                                                                                                                                       
    

Python on Windows

  • 經過一番實驗,發現如果 Windows 10 有把硬碟另外掛載成類似 AUFS 那種路徑,Python PIP 在安裝某些套件時會遇到路徑錯誤。
Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS C:\Users\yawang> pip install virtenv
Collecting virtenv
  Using cached virtenv-0.3.1-py2.py3-none-any.whl (5.8 kB)
Collecting virtualenv
  Using cached virtualenv-20.0.18-py2.py3-none-any.whl (4.6 MB)
Collecting pythonfinder
  Using cached pythonfinder-1.2.3-py2.py3-none-any.whl (39 kB)
Collecting distlib<1,>=0.3.0
  Using cached distlib-0.3.0.zip (571 kB)
    ERROR: Command errored out with exit status 1:
     command: 'c:\scoop\apps\python-embed\current\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'E
:\\SVROOT\\Users\\yawang\\AppData\\Local\\Temp\\1\\pip-install-i0rq_uxn\\distlib\\setup.py'"'"'; __file__='"'"'E:\\SVROO
T\\Users\\yawang\\AppData\\Local\\Temp\\1\\pip-install-i0rq_uxn\\distlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'
"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec
'"'"'))' egg_info --egg-base 'E:\SVROOT\Users\yawang\AppData\Local\Temp\1\pip-install-i0rq_uxn\distlib\pip-egg-info'
         cwd: E:\SVROOT\Users\yawang\AppData\Local\Temp\1\pip-install-i0rq_uxn\distlib\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "E:\SVROOT\Users\yawang\AppData\Local\Temp\1\pip-install-i0rq_uxn\distlib\setup.py", line 14, in <module>
        import distlib
    ModuleNotFoundError: No module named 'distlib'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
PS C:\Users\yawang>

PowerShell

Last modified 4 years ago Last modified on Apr 25, 2020, 3:51:06 PM

Attachments (1)

Download all attachments as: .zip