logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

python kwargs传递多个参数

def my_sum(my_integers):result = 0for x in my_integers:result += xreturn resultlist_of_integers = [1, 2, 3]print(my_sum(list_of_integers))def concatenate(**kwargs):result = ""# Iterating over the Pyth

#python
python csv转换为excel

import pandas as pdimport openpyxldef csv_to_xlsx_pd():csv = pd.read_csv(r'C:1.csv', encoding='utf-8')csv.to_excel(r'C:\1.xlsx', sheet_name='data')if __name__ == '__main__':csv_to_xlsx_pd()

NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver.Make sure that the latest NVIDIA driver is installed and runningsudo apt install dkmssudo dkms install -m nvidia -v 440.82.

python xlrd库报错AttributeError: ‘ElementTree‘ object has no attribute ‘getiterator‘

报错原因:在新版python3.9中,windows中使用的更新删除了getiterator方法,所以我们老版本的xlrd库调用getiterator方法时会报错。2.降低版本后还会报错:AttributeError: ‘ElementTree‘ object has no attribute ‘getiterator‘1.首先报错原因是xlrd版本过高,需要卸载,下载低版本的库:降低第三方库xl

文章图片
#python#开发语言
0-1背包问题【python实现】

背包问题【python实现】

#算法
安装stable diffusion报错from taming.modules.vqvae.quantize import VectorQuantizer2 as VectorQuantizer

在https://pypi.org/project/taming-transformers/#files。接着python setup.py install。

文章图片
nvcc-V 程序“nvcc”尚未安装。 您可以使用以下命令安装: sudo apt install nvidia-cuda-toolkit

在~/bashrc里面export PATH=/usr/local/cuda-11.1/bin:$PATHexport LD_LIBRARY_PATH=/usr/local/cuda-11.1/lib64:$LD_LIBRARY_PATH然后执行:source ~/.bashrc

python安装openGL

在windows_64下利用命令:pip install pyopengl 安装python的openGL环境。结果运行示例代码出现以下错误:OpenGL.error.NullFunctionError: Attempt to call an undefined function glutInitDisplayMode, check for bool(glutInitDisplayMode) be

#python#开发语言
    共 52 条
  • 1
  • 2
  • 3
  • 6
  • 请选择