程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Some Summary of Missing Python Packages

編輯:Python

frontend

當遇到no module named frontend的時候,需要安裝pymupdf,and specify its version number.

pip install PyMuPDF==1.16.14

不僅如此,Should be installed firstfitz,再安裝PyMuPDF.如果發生沖突,卸載掉PyMuPDF,And re-install according to the above statement.

statsmodels

Sometimes inaccessibility occurs、A case where the package cannot be downloaded,This is because the content is an extranet resource,just hang upVPN就行了.

<urlopen error [Errno 11004] getaddrinfo failed>
import numpy as np
import statsmodels.api as sm
import statsmodels.formula.api as smf
dat = sm.datasets.get_rdataset("Guerry", "HistData").data

pandas設置categories

When the category label is set,出現categoriesNo more hints,這是因為在新版本的pandasPrevious support has been removed in ,需要在pandas.api.types.CategoricalDtypeexplicitly declared in .
改之前:

df['class']=df['class'].astype("category",categories= ["n", "s", "k", "mm"],ordered=True)

改之後:

from pandas.api.types import CategoricalDtype
df['class']=df['class'].astype(CategoricalDtype(categories=['n', 's', 'k', 'mm'], ordered=True))

plotnine安裝失敗

這是因為plotnineand already installed on the computermatplotlib沖突了,需要卸載掉matplotlib後重新安裝plotnine.

pip uninstall matplotlib
pip install plotnine

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved