發表文章

目前顯示的是 3月, 2021的文章

Python Code Statement / Comment Method

Python Code Statement / Comment Method dict default foreach Code a_dict = { 'color' : 'blue' , 'fruit' : 'apple' , 'pet' : 'dog' } for key in a_dict: print(key) output color fruit pet foreach .items() Code a_dict = { 'color' : 'blue' , 'fruit' : 'apple' , 'pet' : 'dog' } for key in a_dict.items(): print(key) output ( 'color' , 'blue' ) ( 'fruit' , 'apple' ) ( 'pet' , 'dog' ) Code for key, value in a_dict.items(): print(key, '->' , value) Output color -> blue fruit -> apple pet -> dog datatime String(ISO8601) to Datetime lAt: datetime = dateutil.parser.parse( "2019-09-07T-15:50+00" ) datetime to ISO8601 String time=datetime.now() time.isoformat() JSON Json String to dict qobj = json.loads(jstr) dict to JSON String jstr = json.dumps(dictObj) escape unescape url import urllib.par

如何安裝 anaconda 上找不到的module

圖片
  如何安裝 anaconda 找不到的module 在IDE無法自動安裝套件 Collecting package metadata (current_repodata.json): ...working... done Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve. Collecting package metadata (repodata.json): ...working... done Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve. PackagesNotFoundError: The following packages are not available from current channels: - python-dotenv Current channels: - https://repo.anaconda.com/pkgs/main/win- 64 - https://repo.anaconda.com/pkgs/main/noarch - https://repo.anaconda.com/pkgs/r/win- 64 - https://repo.anaconda.com/pkgs/r/noarch - https://repo.anaconda.com/pkgs/msys2/win- 64 - https://repo.anaconda.com/pkgs/msys2/noarch To search for alternate channels that may provide the conda package you 're looking for, navigate to https://anaconda.org and use the search bar at the top of the page. 而且在 environment 如果找不到指定的套件 透過指令