Tips

0、python的格式化输出,可以用来输出分割填充符https://blog.csdn.net/brucewong0516/article/details/79931997
1、用Git GUI TortoiseGit 做脚本代码在本地的版本管理的时候,遇到在不需要的地方误建了一个gti目录,想通过菜单操作的时候没找到删除的菜单。。最后的参考搜索到的解决方法,显示隐藏的.git文件,直接删除即可。
2、conda和pip安装不上的包,可以手动下载后,cd到对应路径,再pip install文件名实现离线安装。参考
https://stackoverflow.com/questions/51998310/pyaudio-portaudio-issue-python#
Q:
I installed pyaudio with anaconda python. Using conda install pyaudio on windows. It said it installed and it also installed PortAudio with it.

However, when I create my file and run it now I get the following issue.

I have no idea what is going on.

Could not import the PyAudio C module '_portaudio'.
Traceback (most recent call last):
File "C:\Users\This PC\Desktop\Py\demo.py", line 2, in <module>
import pyaudio
File "C:\Users\This PC\Anaconda3\lib\site-packages\pyaudio.py", line 116, in <module>
import _portaudio as pa
ImportError: DLL load failed: The specified module could not be found.
A:
I faced a similar issue.

The only way I was able to resolve this was by uninstalling anaconda, installing the latest version of python, and reinstalling the latest version of conda.

I then downloaded the latest .whl file for pyaudio which can be found here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio

I moved this file from my downloads and into the site-packages folder of anaconda3: C:\Users\Projects\Anaconda3\Lib\site-packages

Upon running the command 'pip install pyaudio' OR 'python -m pip install pyaudio' in the anaconda prompt I was good to go

I hope this helps!

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Git 基本操作 比较两个文件的差异在终端使用diff -u oldFile newFile 使用 more fi...
    风骚无俩阅读 604评论 0 0
  • EnglishVersion ->_->:https://github.com/jiang111/awesome-...
    聂顺阅读 1,272评论 0 4
  • 01.关于Axure元件使用的一些建议。 从元件库中找元件是非常麻烦的一件事,而且不方便对相关元件进行修改。个人建...
    超哥Leo阅读 2,169评论 1 2
  • 工作了两年多,一直有个“坏习惯”,就是将工作中遇到的一些问题、技巧或心得记在印象笔记里面,按理来说,作为一个...
    F森阅读 2,077评论 3 26
  • 1. 程序内计时 趁着跑程序的空当,记录下Matlab计时函数的使用。 tic, toc当你需要计算一组Matla...
    李彪_哈工大阅读 1,298评论 0 6