Use MTK 8516 Platform configuration linux Yocto The system configuration python Many errors are reported in the environment , Record these problems and solutions , For your reference .
Reference link :https://blog.csdn.net/qq_39915318/article/details/106003608
terms of settlement : stay linux Use... On the command line expert Tools :
export PYTHONPATH=/usr/local/lib/python3.5/dist-packages
here , You can print echo $PYTHONPATH Check whether the addition is successful :
stay Yocto The system default python3.5 The library download path for is :/usr/lib/python3.5/site-packages,
So the command should be :
export PYTHONPATH=/usr/lib/python3.5/site-packages.
terms of settlement : Compilation and installation cython
This is actually pip Updating numpy When it comes to problems .
resolvent :
ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip3 install numpy
stay Python27\Lib\distutils\msvc9compiler.py In file , find
mfinfo = self.manifest_get_embed_info(target_desc, ld_args) It will be changed to
mfinfo=none
stay linux The system uses find command :
find -name ‘msvc9compiler.py’
/usr/lib64/python3.5/distutils/msvc9compiler.py
yes python The problem of absolute path and relative path in , modify path Is the absolute path of the current file .
Method :
filepath = os.path.dirname(__file__) + '/'
terms of settlement : These two packages are special , stay import The time is aip and speech_recognition, But in install The installation time is baidu-aip and SpeechRecognition,
ffmpeg -i 1.wav -f wav -ac 1 -ab 16 -y mono.wav
reason :linux The output code in the environment is ansi, No utf-8.
Reference link :utf-8 problem
terms of settlement : Add a condition to the front :PYTHONIOENCODING=utf-8 ,
The perform
PYTHONIOENCODING=utf-8 python3 A1hub.py
Question why : Baidu api There is no voice synthesis service in .
terms of settlement : Open voice synthesis service in Baidu console ( Can claim 5000 One time free quota ).
reason : The folder is read-only , Write permission is required .
Method : perform
mount -o remount,rw rootfs /
problem : Baidu TTS api Output file format is not set in .
Reference link :https://www.cnblogs.com/Jorgensen/p/11546486.html
resolvent :aue Parameter selection 6.6 Corresponding wav Format , The default is output mp3 Format .
Parameter interpretation :
PER = 0# The speaker chooses , Basic sound library :0 For the sake of Xiaomei ,1 For Du Xiaoyu ,3 For the sake of leisure ,4 For Du ya ya ,# Quality Music Library :5 For the sake of Xiaojiao ,103 For dumido ,106 Wei Du Bowen ,110 For kids ,111 For Du Xiaomeng , The default is Du Xiaomei
SPD = 4# The speed , Value 0-15, The default is 5 Chinese speaking speed
PIT = 5# tone , Value 0-15, The default is 5 Chinese tone
VOL = 5# The volume , Value 0-9, The default is 5 Medium volume
AUE = 3# Download file format , 3:mp3(default) 4: pcm-16k 5: pcm-8k 6. Wav
FORMATS = {3: “mp3”, 4: “pcm”, 5: “pcm”, 6: “wav”}
FORMAT = FORMATS[AUE]
Question why :MAC upgrade BigSur after python3.9 Follow numpy Are not compatible .
terms of settlement : Execute first
brew install openblas
Re execution
OPENBLAS="$(brew --prefix openblas)" pip3 install numpy
reason : upgrade setuptools To version 51.
Reference link :https://stackoverflow.com/questions/64884415/cant-install-matplotlib-on-macos-big-sur
Method :
pip3 install setuptools==51 --user