個人資料
歸檔
正文

python

(2020-01-03 19:14:58) 下一個

https://stackoverflow.com/questions/29123840/how-to-generate-test-report-using-pytest

1. Python須知

通常認為是腳本。雖是目前數一數二的軟件,插件和包很多,也許是比較簡單,據說是解釋和編譯都行。缺點有版本不兼容和更新快,但是最討厭的是:

1.1 縮進的句法:

上麵這段程序,倒數第2行若無4個空格,則最後一行被排除在for loop外,解釋器會報錯。換句話說,空行必須包含適當的空格以保持上下文的連續性。增加代碼後一定要查縮進。

在pycharm下,你特意的留空在保存文件後消失。需要點擊Settings|CodeStyle|Python|Tabs and Indents下的Keepindents on empty line。而且這個語言的下拉單不是每次都顯,點幾次Code Style前的下拉箭頭你就知道了。

1.2 不統一的安裝路徑

特別是Windows下,全局裝在Program Files下,單用戶在C:AppDataRoamingPython下,在AppData下就可以有幾個安裝目錄,還有是否用了虛擬環境,Linux下有類似問題。此時,相關的包不知連到哪個解釋器下,相關軟件可能隻尋找局部或全局的包,可能得裝多次。這種機製有個好處就是可以裝不同版本的Python。全局安裝的問題是如果你在程序中安裝包與有授權的問題,在控製台下安裝可以右擊以admin權限運行控製台。在裝包時建議指定相關的Python.exe路徑(藍色字串),不然未必知道安裝是與哪個解釋器綁定的:"c:Program FilesPython38python.exe" -m pip install auto-py-to-exe

如果Ubuntu下pip有問題:https://stackoverflow.com/questions/69503329/pip-is-not-working-for-python-3-10-on-ubuntu/69527217#69527217? 

用PyCharm時若不用已裝的解釋器而新建env,則每個項目都會拷貝一套解釋器和site package。創建新項目時,Location的選擇可以是現有目錄,解釋器建議選Previously configured interpreter|Add Local Interpreter,如下: 

1.3 版本不兼容

網上許多例子都是v2的,特點之一是print內容沒括號。

1.4 調用/import

import用於各種包/庫的引用。任何外部文件如ex.py可以被import py或from py import subd引用。但是,import某文件可能導致它被執行,即便是def函數也會被執行。要想它們隻在被調用時執行,可以把它們都放在class裏,而主程序用下述語句:

def main():
    print('main')

if __name__ == "__main__":
    main()  #被import 時將不運行main()

2. Install

安裝時注意選上路徑,這樣無論在哪個目錄下,py都可運行python。不要用缺省安裝,選all users以便裝到Programs下麵。原帶IDLE功能一般,可在notepad++下定義熱鍵Alt+P來運行當前編輯窗口中的python程序,方法是:選Run|Run,鍵入py "$(FULL_CURRENT_PATH)",點擊Save並選擇熱鍵。

python
>>>import os
>>>os.system('cd')                 
>>>^z
notepad hello.py
print("Hello Python world!")   #save and quit, then run the script:
python hello.py

2.1 pip安裝工具:C:UsersYingzhouDaiAppDataLocalProgramsPythonPython310>python get-pip.py
  WARNING: The scripts pip.exe, pip3.10.exe and pip3.exe are installed in 'C:UsersYingzhouDaiAppDataLocalProgramsPythonPython310Scripts' which is not in PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-22.1.1 wheel-0.37.1

2.2 Poetry安裝管理工具:

比pip好的是它也管理卸載:python.exe -m pip install poetry
[PS]> poetry shell 
[PS]> Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass 

2.3 路徑和包https://www.shivmanlabs.com/post/how-to-add-python-path-to-environmental-variables  常見為 C:UsersnameAppDataRoamingPython  C:UsersnameAppDataLocalProgramsPython 及其下Scripts。如果有多個python版本,建議安裝包命令:path_to_my_python.exe -m pip install PACKAGE_NAME_HERE 如果安裝包含後import報錯,可以增加PYTHONPATH,用下列命令查看:
>>>import sys
>>>sys.path

pip install psutil //computer util
pip install requests //http
pip install python-forecastio
https://pyvisa.readthedocs.io/en/latest/introduction/getting.html NI/Keysight GPIB/232/Eth ctrl
pip list
py --version
>>> import tkinter
>>> tkinter.TkVersion

v3.10.2 @Jan.2022   https://freepdf-books.com/ 

Pycharm常找不到包而在cmd下運行python又沒問題。關鍵是File|New project setup要定義解釋器並查看包,而不是右擊Modify run config下。

Parcharm找不到包是配置問題。vscode好些,裝個微軟的python pluging就行,顏色更豐富。推薦。

2.4 其它包

2.4.1 py轉exe

(psgdemos裏有):  https://pysimplegui.readthedocs.io/en/latest/cookbook/ 

Python 生成 Windows 執行檔教學 我已經用過pyinstaller很多次但還是常採坑.
最新的我用虛擬環境,但沒注意到有個library是裝在外麵,pyinstaller沒辦法打包不在虛擬環境內安裝的library.裝在虛擬環境裡麵就好了

pyInstaller -F hello.py 針對單文件;pyInstaller -D mycode.py則針對目錄, 生成的exe在dist|下。後者我包括了3個源文件,GUI調用可獨立運行的console和包檢查安裝程序,在W10下沒有問題。--add-data 和--add-binary 分別添加文本和二進製文件,例如--add-binary="pyidmffmpeg.exe;."或--add-binary="libfoo.so:lib"。我沒用它們,也可直接拷貝到目標目錄下。轉好後運行dist/mycode/mycode.exe,如果缺少如setuptools模塊用後python.exe -m pip install --upgrade setuptools安裝。我實際的命令:pyinstaller --add-binary="pyidmffmpeg.exe;."  -D pyidm.py

不推薦某人做的GUI即auto_py_to_exe,它不過是調用pyInstaller而且很垃圾:https://github.com/brentvollebregt/auto-py-to-exe/issues/309 

我另一項目包括GUI和console app,兩者可獨立運行,GUI調用console.py,因此我用pyInstaller -F 分別生成了兩個可執行文件。

科學工具:pip install Scipy pip install numpy
GUI: pip install PySimpleGUI    https://pysimplegui.readthedocs.io/en/latest/cookbook/#the-pysimplegui-cookbook 
GUI百例:C:UsersYingzhouDai>psgdemos
python -m pip install -U matplotlib ;
https://matplotlib.org/stable/users/installing/index.html 
Excel圖形:pip install matplotlib pip install pillow https://edadocs.software.keysight.com/kkbopen/how-does-sin-x-x-sinc-interpolation-work-616372293.html 

Excel包https://pypi.org/project/openpyxl/    https://openpyxl.readthedocs.io/en/stable/  https://realpython.com/openpyxl-excel-spreadsheets-python/ https://www.geeksforgeeks.org/python-reading-excel-file-using-openpyxl-module/
C:UsersYingzhouDaiAppDataLocalProgramsPythonPython310Scripts>pip install openpyxl

Anaconda
https://blog.csdn.net/ITLearnHall/article/details/81708148 裝完後,搜索anaconda並運行;直接打開cmd運行conda是不行的。
 
 requriements.txt 和setuptools
pip install -r requirements.txt
如果是多平台,你會用到setup.py/setup.cfg。
2.4 requirements
1)首先產生requirements.txt:
pip freeze > requirements.txt
這個產生全局的模塊列表,要隻產生某個項目的且包含子模塊,用:
pip install pipreqs && pip install pip-tools
pipreqs --savepath=requirements.in && pip-compile
2)安裝
pip install -r requirements.txt

3.學習和實例

3.1 在線教程https://www.w3schools.com/python/python_ml_getting_started.asp?  https://www.tutorialspoint.com/python/index.htm  其中print的內容在v3.8下運行都要加括號。https://www.pythontutorial.net/python-basics/ https://docs.python.org/3/howto/regex.html https://realpython.com/python-sockets/ regular expression不直觀,看實例:https://www.w3schools.com/python/python_regex.asp

https://docs.python.org/3/tutorial  https://github.com/EvanLi  https://www.jb51.net/article/233156.htm 

Python編程:從入門到實踐(Python Crush Course) -code:https://nostarch.com/pythoncrashcourse2e; 流暢的Python(fluent python) 更多書籍:http://www.lanjuhua.com/s/WiQBL1V_BzkBNVdp/id/6894715807

3.2 Access Internet - result 200

import urllib.request
weburl = urllib.request.urlopen('https://www.youtube.com/user/guru99com')
print("result: " + str(weburl.getcode()))

3.3 Show time

import datetime
now = datetime.datetime.now()
print ("Current date and time : ")
print (now.strftime("%Y-%m-%d %H:%M:%S"))

3.4 Send email

import smtplib
msg = email.message_from_string('context')
msg['From'] = "yzdai@hotmail.com"
msg['To'] = "yzdai@yahoo.com"
msg['Subject'] = "TestPythonTitle"
s = smtplib.SMTP("smtp.live.com",587)
s.ehlo() # Hostname to send for this command defaults to the fully qualified domain name of the local host.
s.starttls() #Puts connection to SMTP server in TLS mode
s.ehlo()
s.login('yzdai@hotmail.com', 'yourpasswd')
s.sendmail("yzdai@hotmail.com", "yzdai@yahoo.com", msg.as_string())
s.quit()

3.5 Multithread

3.5.1 

import threading, zipfile

class AsyncZip(threading.Thread):
    def __init__(self, infile, outfile):
        threading.Thread.__init__(self)
        self.infile = infile
        self.outfile = outfile

    def run(self):
        f = zipfile.ZipFile(self.outfile, 'w', zipfile.ZIP_DEFLATED)
        f.write(self.infile)
        f.close()
        print('Finished background zip of:', self.infile)

background = AsyncZip('mydata.txt', 'myarchive.zip')
background.start()
print('The main program continues to run in foreground.')

background.join()    # Wait for the background task to finish
print('Main program waited until background was done.')

3.2 threading

# Python program to illustrate the concept of

# threading importing the threading module
import threading
def print_cube(num):
    """
    function to print cube of given num
    """
    print("Cube: {}".format(num * num * num))
def print_square(num):
    """
    function to print square of given num
    """
    print("Square: {}".format(num * num))
if __name__ == "__main__":
    # creating thread
    t1 = threading.Thread(target=print_square, args=(10,))
    t2 = threading.Thread(target=print_cube, args=(10,))
    # starting thread 1
    t1.start()
    # starting thread 2
    t2.start()
    # wait until thread 1 is completely executed
    t1.join()
    # wait until thread 2 is completely executed
    t2.join()
    # both threads completely executed
    print("Done!")
3.3 更好的實例
s是串口的list,程序用thread打開每個串口,調check_serial_port讀寫每個串口,根據響應判斷出終端類型,返回結果dict={'BMC':'COM5'}一類。
在所有終端都找到後,event.set()給各任務發消息使其退出。
import concurrent.futures

 
3.6 OS
import os
os.getcwd()      # Return the current working directory, or use:
os.system('cd')
os.chdir('/server/accesslogs')   # Change current working directory
os.system('mkdir today')   # Run the command mkdir in the system shell
dir(os)
help(os)
import shutil
shutil.copyfile('data.db', 'archive.db')
shutil.move('/build/executables', 'installdir')
import glob
glob.glob('*.py')
import sys
print(sys.argv)

3.7 file I/O

import os
print(os.getcwd())
f = open("pydemo.txt", "w")
f.write("File write or reaplce mode, not append mode!")
f.close()
f = open("pydemo.txt", "r")
s = f.read(10);
s1 = f.read();
print(s,s1)
f.close()
import os.path
file_exists = os.path.exists('pydemo2.txt')
if file_exists:
  os.remove("pydemo2.txt")
  
os.rename( "pydemo.txt", "pydemo2.txt" )
f = open("pydemo2.txt", "r")
s = f.read(10);
position = f.seek(0, 0);
s1 = f.read();
print(s, s1)
f.close()

4. GUI & IDE

4.1 Basic tool

https://realpython.com/python-gui-tkinter/  https://pythonguides.com/python-tkinter-listbox/

#pip install tk
import tkinter as tk
top = tk.Tk()
# Code to add widgets will go here...
top.mainloop()    #1st window
window = tk.Tk()  #2nd window
greeting = tk.Label(text="Hello, Tkinter")
greeting.pack()

4.2 PyCharm IDE

pySimpleGUI是目前比較火的開源包,能實現非常複雜的GUI。官方支持的IDE有兩個,vs code和pycharm,前者免費但開銷大更新快比較羅嗦,後者價格不菲按年收費但community或教育版免費,比專業版少了一些功能。中文指南:PyCharm 中文指南(Win版) 2.0 iswbm王炳明(github.com)

安裝後用Alt+Sht+S配置python 3.8解釋器,然後點擊+號安裝模塊例如pycurl。自此可以運行pyidm.py下載youtube視頻。

VersionControl見3.2.1,Debug有單步/斷電/回到現場等功能,Terminal是Windows PowerShell,Packages是包管理器,Console是並行工作的解釋器,對現場調試正則表達式特別方便。熱鍵(注意Lenovo下Fx需按Fn+Fx):https://resources.jetbrains.com/storage/products/pycharm/docs/PyCharm_ReferenceCard.pdf 

^P/^Q可以顯示函數原型/函數注釋(DocString),顯示函數源碼有兩種方法:Ctrl+Sht+I跳轉到函數,Ctrl+Sht+i則彈出窗口顯示。

Ctrl F/R:find/replace

F2/ShtF2:跳轉到下/上個錯誤

Alt ^/Alt v:  跳轉到上/下個def

Alt 6:增加TODO/注釋,即程序員的思路或待編程碼

Alt v:最近的收索記錄

起步:File|New Project, File|New Scratch。運行參數需右擊程序名tab,選More Run/Debug->Modify Run Configuration...,但更快的是點擊icon行右側運行按鈕前,程序名向下按鈕。

選中一段程序按Alt+Sht+E可以運行它,或右擊選Execute Slelection

要debug,點擊某行左側使顯示紅圓點,在點擊爬蟲即debug圖標,程序將停在斷點處並顯示單步等圖標在下部窗口上端。

屏幕最底行是狀態,上一行的常用tab是版本控製、TODO、問題、包、Python console、Terminal。在調試時,下部左可選擇相關函數,中部是變量可點擊修改,右邊是變量窗口。調試時變量值會顯示在源碼行或鼠標位置;變量窗可加入監視變量,點擊右端的...可擴展list/dic的值。

Getting Started with PyCharm 7/8: Testing 係列教程的測試篇,右擊函數名選Go to|Test會生成測試程序框架,可方便的import該函數並給予實參,運行後會顯示測試覆蓋率。 

4.2.1 console paramter

右擊選Run configuration,所填參數要雙引號括起,目錄是單個反折線,interprete options是-s?注意隻在第二行選中文件名而非Current File時有效。

4.2.2 Git版本控製

右擊文件名選Local History可方便的與本地或clone出的版本比較,無需VCS。

VCS|Get from version control, Download and install Git,填入github源碼URL;

點擊VCS|Enable並選Git,該VCS和左下Versiona Control都會變成Git;

登錄Gitlab或Github,點+號創建一個項目,在clone出選擇相關URL如https;

在Pycharm中選Git|Clone,鍵入上麵拷貝的URL,登錄名和口令,選打開為新窗口。用File|New創建,或Open選已有的項目目錄。

在左側窗口高亮所有要推送到Gitlab的文件,右擊選Git及其最上麵的Add,將這些文件加入VCS;

點擊最左邊Project下的Commit紐,這兩個紐都是縱向tab,選中要上載的文件並填寫備注文本,如此次提交的是啥,改正的錯誤描述;然後點擊Commit或Commit and Push紐,如果隻點了Commit可以另外用右上方的Git push。Push就是上推到網上,在Gitlab或刷新後的GitHub上可以看見其內容。

Gitlab/Github的配置和使用:https://cloud.tencent.com/developer/article/1478265?輸入 GitHub 倉庫的地址和本地目錄時,目錄必須是空的,PyCharm 新建項目的時候,會自動創建 .idea 文件夾,這個必須刪掉。 在項目中新建文件,彈出提示框:是否將文件添加到 Git。勾上 Remember, don't ask again 再點擊【Yes】。點擊左側垂直tab,選要commit的文件並輸入Commit Message後點擊下方【Commit】。已經提交的文件文件名顯示是 白色,未提交的文件文件名顯示是 綠色。最後選右上方Push.

如果是先有本地目錄,VCS|Get from version control, Download and install Git,填入github源碼URL; 這一步要改成VCS|Manager remote,填入github源碼URL。第一次commit/push後,在gitlab中要做merge request才能完成。

使用遠端時可能會有超時錯誤,重試就會彈出“Use your browser to login in”,登錄Git後才會正常操作。

 https://www.youtube.com/watch?v=zrsqqyN2me8 https://www.youtube.com/watch?v=-_g3QITLaQA https://blog.csdn.net/zd147896325/article/details/89540477 

PyCharm In-Depth VCS #1: Getting Started https://www.youtube.com/watch?v=_w9XWHDSSa4 https://www.youtube.com/watch?v=AHkiCKG-JhM 詳見另文。

Git and GitHub Tutorials: https://www.youtube.com/watch?v=r50BKIFGCI0?  https://www.youtube.com/watch?v=hMfi_ONvGEs https://www.youtube.com/watch?v=iJKIxrJ40ss 

Gitlab Tutorial: GitLab Beginner Tutorial 1 | Introduction and Getting Started - YouTube 

4.2.3 代碼整形

Code|Reformat code。注意2020.2開始沒有tab的定義了,強製為4個空格,但Ctrl+Alt+S可選擇按原文件的縮進。這個隻是輔助,例如def後的程序行,還是得人工開始縮進;不過一旦for縮進了,餘下的行可以整形。參見0.1節。

2022版無效?安裝sudo pip install autopep8,再選Tools|ExternalTools加autopep8,再選中一段代碼,右擊選ExternalTools->autopep8,即可按Pep8標準整形代碼。

JSON字串整形:Ctrl+Alt+L,或安裝JSON Parser插件,其在右側顯示。

4.2.4 插件與工具

點擊左側Plugins可以安裝Regex Tester,用於測試正則表達式。安裝後點擊左下角的雙疊方框,在窗口中輸入例如:^1(3|4|5|7|8)d{9},匹配的字符串會顯示高亮。

點擊Tools的Add new bash console,可以彈出 Bash 窗口,使用 Linux 命令如ls -l

選中代碼段後,右擊並選Execute Selection in Python Console或熱鍵Alt+Sht-Et-E,可彈出Python shell並執行該段代碼。

誤刪恢複:在項目目錄裏點擊右鍵,選 Local History 再選Show History,在刪除的記錄項上右擊選擇 Revert 。

塊編輯:乒乓開關是Alt+Sht+Insert,或右擊後選Column select mode。

改變量/函數名:Sht+F6/Ctrl+F6

File|Settings|Project|Interpreter,可顯示/管理已裝的包。

隱藏/重顯左側項目樹:點擊左側垂直顯示的Project。

文件隻讀/可寫:點擊右下角的鎖圖標置為隻讀,編輯時會彈出窗口允許解鎖。

自動加載包:在函數名上按Alt+Enter,在彈出圖標上選擇包將自動 import - not work

顯示項目數中包函數源碼:在包/函數名上右擊,Open in選Explorer或Terminal

4.3 Spyder

Anaconda自帶。在W11可用PIP安裝,Win10/MAC下載安裝包,Ubuntu 20.04下用APT裝但是版本舊。比PyCharm簡單,pkg功能差些,沒有版本控製如Git接口,但是免費,有variable explorer可以觀看修改當前運行腳本的全部變量。數組變量可以雙擊後修改各分量。其它腳本調用VariableExplorer中變量,通常需在Run|General settings勾上Run in console's name space。與Pycharm相比,後者右下部是debug相關的變量,點擊右端可彈出數組分量,在源碼行的右端,或光標停在某變量上都會顯示其值。

run/debug有10個圖標:運行符號>、單元運行》(cell是以#%%或分開的行)、選擇塊運行I>(類似選中一段代碼以Ctrl+Enter執行),Step in/out等。

左窗是源碼,右上窗下部tab有Help|VariableExporer|Plot|Files,右下的tab有IPython Console和History。兩者頂部都有選擇項,如右上的object前可以選擇Source是Editor或Console,選後者並鍵入如numpy.array可顯示函數定義。右上選Plot時,上部有Save/Copy、放縮等紐,右上三橫圖標有相關功能。

Ctrl+I顯示函數定義;要不受限製的顯示圖形,點擊扳手圖標(Preference)|IPython console|Graphics,Backend裏由Inline改填Qt5,再重開Spyder。新法是View|Lock Panes and Tool bars的選擇與否。三窗的右上角三橫圖標裏也有窗口Lock與否的選擇,還可水平/垂直分屏,或選擇New以創建新窗打開新文件。

不支持PySimpleGUI。

http://docs.spyder-ide.org/5/  https://blog.csdn.net/qq_33793599/article/details/81359947 

4.4 IPython

https://blog.csdn.net/qq_27825451/article/details/84320859 交互式Python shell,帶輸入輸出行號及顏色,按Tab顯示相關變量/函數,變量後加?顯示定義(加??顯示源碼,還可用re.*find*模糊查找),用hist [n]顯示曆史記錄,%run 運行程序,!運行shell命令,等。Pycharm/Spyder均內置IPython,在調試時均為現場相關,可觀看修改變量和運行程序。

4.5 不同平台

    from sys import platform
    if platform == "linux" or platform == "linux2":
        if cmd == "notepad++":
            cmd = "/snap/bin/notepad-plus-plus"
        elif cmd == "bluegriffon":
            cmd = "/usr/bin/bluegriffon"
    elif platform == "darwin":  # OS X
        print("cmdexec err-1000: OS platform not supported.")
        return 1000
    elif platform == "win32":  # win32/64
        if cmd == "notepad++":
            cmd = "c:Program FilesNotepad++notepad++.exe"
            # c:ProgramDataMicrosoftWindowsStart MenuProgramsNotepad++.lnk
        elif cmd == "bluegriffon":
            cmd = "C:ProgramDataMicrosoftWindowsStart MenuProgramsBlueGriffonBlueGriffon.lnk"

libreoffice --calc 

4.6 PyIDM & PyCurl

PyIDM是網上視頻下載器,2020.5停止開發並去除支持及win版下載,可下載的源碼有些舊風格的編碼,在Ubuntu 20.04下安裝正常運行崩潰與gtk有關,windows下有LibCurl但PyCurl不能利用安裝出錯,有的是須在MingW32環境下編譯,或者報缺少頭文件,或者關於需要的包名稱不清,相關說明也挺亂的。我花了一天半讓PyIDM在Win下運行但還是沒有PyCurl。以下備忘。

git clone https://github.com/pycurl/pycurl.git  這裏https://curl.se/download.html下載Curl的Win/Linux源碼,注意win10/11有帶,Curl-V可見版本如7.83.1(20220513)。按此處 http://pycurl.io/docs/latest/install.html Win下配置Pycurl的命令是:

python setup.py --curl-dir=c:dev|curl-7.33.0|builds|libcurl-vc-x86-release-dll-ipv6-sspi-spnego-winssl --use-libcurl-dll

這裏目錄指向libcurl頭文件和DLL庫。官方是運行winbuild.py,我的出錯-也許隻能在MingW32下運行。上述命令中的buidls和dll在我下載的curl裏根本沒有。官版說明未給實際編譯的方法,開源碼的混亂可見一斑。https://truxton2blog.com/pycurl-performance-differs/? 

後來找到這個今年的帖子:

https://knowledge.informatica.com/s/article/HOW-TO-Build-Libcurl-Libraries-for-Windows-and-Linux-for-Data-Archive?language=en_US 需要Visual studio 2019:https://docs.microsoft.com/en-us/visualstudio/releases/2019/history#installing-an-earlier-release 

又找到這個,原來最後一個windows版是https://pypi.org/project/pycurl/7.43.0.5/#files 如果你隻是運行pip install pycurl==7.43.0.5 它照樣以為你在Linux下。因此我下載了其windows版-2020.1.29,又在此處下載比它稍舊的https://www.python.org/downloads/release/python-381/ 但是3.10.4也可以用它。

其實到這裏,我腦子裏隻剩下一個字:操!
腦子裏又跑出一個小人,說:You got what you pay for! PyCurl is free!

"c:Program Filespython38python.exe"
Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pycurl
>>>

https://www.lfd.uci.edu/~gohlke/pythonlibs/#pycurl python 3.10我用的是: pip install pycurl?7.45.1?cp310?cp310?win_amd64.whl 

4.7 視頻轉換項目

https://blog.csdn.net/thehunters/article/details/120988549?spm=1001.2101.3001.6650.5 

https://blog.csdn.net/woaidianqian/article/details/124280508?spm=1018.2226.3001.4187

https://blog.csdn.net/Jolen_xie/article/details/109270914?spm=1001.2101.3001.6650.2

 

 

 

 

 

 

 

 

 

 

 

[ 打印 ]
閱讀 ()評論 (0)
評論
目前還沒有任何評論
登錄後才可評論.