|
本帖最后由 Qter 于 2020-12-20 00:16 编辑
下面方式安装的包,都在这个位置- C:\Users\Administrator\AppData\Local\Programs\Python\Python39\Lib\site-packages
复制代码 Python通过pip安装拼音包
pip install xpinyin
Collecting xpinyin
Downloading xpinyin-0.7.4-py3-none-any.whl (130 kB)
|████████████████████████████████| 130 kB 23 kB/s
Installing collected packages: xpinyin
Successfully installed xpinyin-0.7.4
安装视频编辑模块- C:\Users\Administrator>pip install moviepy
- Collecting moviepy
- Downloading moviepy-1.0.3.tar.gz (388 kB)
- |████████████████████████████████| 388 kB 9.3 kB/s
- Collecting decorator<5.0,>=4.0.2
- Downloading decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
- Collecting tqdm<5.0,>=4.11.2
- Downloading tqdm-4.54.1-py2.py3-none-any.whl (69 kB)
- |████████████████████████████████| 69 kB 9.5 kB/s
- Collecting requests<3.0,>=2.8.1
- Downloading requests-2.25.1-py2.py3-none-any.whl (61 kB)
- |████████████████████████████████| 61 kB 6.0 kB/s
- Collecting proglog<=1.0.0
- Downloading proglog-0.1.9.tar.gz (10 kB)
- ERROR: Could not find a version that satisfies the requirement numpy>=1.17.3 (from moviepy) (from versions: none)
- ERROR: No matching distribution found for numpy>=1.17.3 (from moviepy)
- WARNING: You are using pip version 20.2.3; however, version 20.3.3 is available.
- You should consider upgrading via the 'c:\users\administrator\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' command.
复制代码 上面出错,先安装一下 proglog- C:\Users\Administrator>pip install proglog
- Collecting proglog
- Using cached proglog-0.1.9.tar.gz (10 kB)
- Collecting tqdm
- Using cached tqdm-4.54.1-py2.py3-none-any.whl (69 kB)
- Using legacy 'setup.py install' for proglog, since package 'wheel' is not installed.
- Installing collected packages: tqdm, proglog
- Running setup.py install for proglog ... done
- Successfully installed proglog-0.1.9 tqdm-4.54.1
- WARNING: You are using pip version 20.2.3; however, version 20.3.3 is available.
- You should consider upgrading via the 'c:\users\administrator\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' command.
复制代码 再重新安装一下- C:\Users\Administrator>pip install moviepy
- Collecting moviepy
- Using cached moviepy-1.0.3.tar.gz (388 kB)
- Collecting decorator<5.0,>=4.0.2
- Using cached decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
- Requirement already satisfied: tqdm<5.0,>=4.11.2 in c:\users\administrator\appdata\local\programs\python\python39\lib\site-packages (from moviepy) (4.54.1)
- Collecting requests<3.0,>=2.8.1
- Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB)
- Requirement already satisfied: proglog<=1.0.0 in c:\users\administrator\appdata\local\programs\python\python39\lib\site-packages (from moviepy) (0.1.9)
- Collecting numpy>=1.17.3
- Downloading numpy-1.19.4-cp39-cp39-win_amd64.whl (13.0 MB)
- |████████████████████████████████| 13.0 MB 46 kB/s
- Collecting imageio<3.0,>=2.5
- Downloading imageio-2.9.0-py3-none-any.whl (3.3 MB)
- |████████████████████████████████| 3.3 MB 31 kB/s
- Collecting imageio_ffmpeg>=0.2.0
- Downloading imageio_ffmpeg-0.4.2-py3-none-win_amd64.whl (22.6 MB)
- |████████████████████████████████| 22.6 MB 51 kB/s
- Collecting certifi>=2017.4.17
- Downloading certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
- |████████████████████████████████| 147 kB 53 kB/s
- Collecting chardet<5,>=3.0.2
- Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB)
- |████████████████████████████████| 178 kB 60 kB/s
- Collecting urllib3<1.27,>=1.21.1
- Downloading urllib3-1.26.2-py2.py3-none-any.whl (136 kB)
- |████████████████████████████████| 136 kB 73 kB/s
- Collecting idna<3,>=2.5
- Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
- |████████████████████████████████| 58 kB 47 kB/s
- Collecting pillow
- Downloading Pillow-8.0.1-cp39-cp39-win_amd64.whl (2.1 MB)
- |████████████████████████████████| 2.1 MB 30 kB/s
- Using legacy 'setup.py install' for moviepy, since package 'wheel' is not installed.
- Installing collected packages: decorator, certifi, chardet, urllib3, idna, requests, numpy, pillow, imageio, imageio-ffmpeg, moviepy
- Running setup.py install for moviepy ... done
- Successfully installed certifi-2020.12.5 chardet-4.0.0 decorator-4.4.2 idna-2.10 imageio-2.9.0 imageio-ffmpeg-0.4.2 moviepy-1.0.3 numpy-1.19.4 pillow-8.0.1 requests-2.25.1 urllib3-1.26.2
- WARNING: You are using pip version 20.2.3; however, version 20.3.3 is available.
- You should consider upgrading via the 'c:\users\administrator\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' command.
复制代码 运行程序,还是会报如下错误- python getFiles.py
- ** On entry to DGEBAL parameter number 3 had an illegal value
- ** On entry to DGEHRD parameter number 2 had an illegal value
- ** On entry to DORGHR DORGQR parameter number 2 had an illegal value
- ** On entry to DHSEQR parameter number 4 had an illegal value
- Traceback (most recent call last):
- File "D:\github\he_chengjin_outlook\Meedu\meedu\二次开发\getFiles.py", line 5, in <module>
- from moviepy.editor import VideoFileClip
- File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\moviepy\editor.py", line 24, in <module>
- import imageio
- File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\imageio\__init__.py", line 22, in <module>
- from .core import FormatManager, RETURN_BYTES
- File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\imageio\core\__init__.py", line 10, in <module>
- from .util import Image, Array, Dict, asarray, image_as_uint, urlopen
- File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\imageio\core\util.py", line 19, in <module>
- import numpy as np
- File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\numpy\__init__.py", line 305, in <module>
- _win_os_check()
- File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\numpy\__init__.py", line 302, in _win_os_check
- raise RuntimeError(msg.format(__file__)) from None
- RuntimeError: The current Numpy installation ('C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\numpy\\__init__.py') fails to pass a sanity check due to a bug in the windows runtime. See this issue for more information: https://tinyurl.com/y3dm3h86
复制代码 报错原因:
1、使用python3.9和numpy1.19.4时会发生此错误
2、numpy 1.19.4所有Python版本都无法执行的错误。使用以前的版本来解决该问题(版本问题)
查看版本信息
- C:\Users\Administrator>pip show numpy
- Name: numpy
- Version: 1.19.4
- Summary: NumPy is the fundamental package for array computing with Python.
- Home-page: https://www.numpy.org
- Author: Travis E. Oliphant et al.
- Author-email: None
- License: BSD
- Location: c:\users\administrator\appdata\local\programs\python\python39\lib\site-packages
- Requires:
- Required-by: moviepy, imageio
复制代码
查看有哪些版本可用- C:\Users\Administrator>pip install numpy==
- WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/numpy/
- ERROR: Could not find a version that satisfies the requirement numpy== (from versions: 1.3.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0.post2, 1.10.1, 1.10.2, 1.10.4, 1.11.0b3, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.11.1rc1, 1.11.1, 1.11.2rc1, 1.11.2, 1.11.3, 1.12.0b1, 1.12.0rc1, 1.12.0rc2, 1.12.0, 1.12.1rc1, 1.12.1, 1.13.0rc1, 1.13.0rc2, 1.13.0, 1.13.1, 1.13.3, 1.14.0rc1, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.14.6, 1.15.0rc1, 1.15.0rc2, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0rc1, 1.16.0rc2, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.16.6, 1.17.0rc1, 1.17.0rc2, 1.17.0, 1.17.1, 1.17.2, 1.17.3, 1.17.4, 1.17.5, 1.18.0rc1, 1.18.0, 1.18.1, 1.18.2, 1.18.3, 1.18.4, 1.18.5, 1.19.0rc1, 1.19.0rc2, 1.19.0, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20.0rc1)
- ERROR: No matching distribution found for numpy==
复制代码 安装最新版本试试
- C:\Users\Administrator>pip install numpy==1.20.0rc1
- Collecting numpy==1.20.0rc1
- Downloading numpy-1.20.0rc1-cp39-cp39-win_amd64.whl (13.7 MB)
- |████████████████████████████████| 13.7 MB 6.4 MB/s
- Installing collected packages: numpy
- Attempting uninstall: numpy
- Found existing installation: numpy 1.19.4
- Uninstalling numpy-1.19.4:
- Successfully uninstalled numpy-1.19.4
- Successfully installed numpy-1.20.0rc1
复制代码
成功,对不是视频的文件要过滤一下
|
|