![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
文章平均质量分 61
可可与鱼
这个作者很懒,什么都没留下…
展开
-
(已解决)报错 ValueError: Tensor conversion requested dtype float32 for Tensor with dtype resource
tensorflow 1.14 里自带的 layer 与 keras layer 数据类型冲突的问题。原创 2022-03-30 21:11:28 · 4806 阅读 · 0 评论 -
(已解决)报错:qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in ““ even though it was found
问题:ubuntu16.04系统,pycharm运行程序报错:qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “” even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this probl原创 2022-03-09 20:38:31 · 4634 阅读 · 6 评论 -
(已解决) ROS kinetic报错: lib***: cannot open shared object file: No such file or directory
系统: ubuntu 16.04, ROS kinetic问题:装好ROS后, 运行roscore发现一直 process died, 报错找不到 libroscpp.so, cannot open shared object file: No such file or directory运行其他 roslaunch, 也是报错找不到各种 lib***: cannot open shared object file: No such file or directory查了很多资料, 全是让原创 2021-12-09 18:08:16 · 1083 阅读 · 2 评论 -
使用 Python 从不同频率信号叠加结果中检测某一频率点的幅度和相位
问题:如何从传感器测到的不同频率信号叠加结果中,检测某一给定频率信号的幅度和相位?Toy example:假设采样频率 fs=5000Hzf_s = 5000Hzfs=5000Hz信号时间长度 T=0.01sT=0.01sT=0.01s信号0:直流信号 y1=A0y_1 = A_0y1=A0,幅度A0=1A_0=1A0=1信号1:正弦波信号 y1=A1sin(2πf1t+ϕ1y_1 = A_1 sin(2\pi f_1t+\phi_1y1=A1sin(2πf1t+ϕ1),幅度A1原创 2021-09-16 14:47:01 · 1511 阅读 · 0 评论 -
(已解决)python读写含中文的json文件时报错或中文显示不正常如“\u56db“ 及 ubuntu系统中用gedit打开json中文显示乱码
1、 python读json文件(含中文)报错报错:UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xcb in position 8: invalid continuation byte解决方法:读文件时 encoding=‘gbk’json_file = 'try.json'with open(json_file, "r", encoding='gbk') as file: json_data = json.load(file)原创 2021-09-07 10:56:53 · 5360 阅读 · 1 评论 -
备忘录:anaconda环境克隆与各种pip安装软件包的一键转移
长期使用anaconda虚拟环境工作的必备技能导出一个工程需要的所有软件包,方便在新的机器上克隆出所需的环境。“复制”:conda env export --no-build > environment.ymlpip freeze > requirements.txt“粘贴”:conda env create -f environment.yamlpip install -r requirements.txt...原创 2020-12-15 22:24:07 · 1513 阅读 · 0 评论 -
(已解决)Import报错 Version `GLIBCXX_3.4.22‘ not found
系统 ubuntu 16.04报错:anaconda环境下python3.7 import一个包时遇到这个报错:ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22’ not found检查版本:strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCX发现最高只有 GLIBCXX_3.4.21,而不是 3.4.22,需要更新原创 2020-08-08 18:09:52 · 9935 阅读 · 3 评论 -
SARL*: 基于深度强化学习的移动机器人室内导航算法及其ROS实现
sarl_starROS implementation of our paper SARL*: Deep Reinforcement Learning based Human-Aware Navigation for Mobile Robot in Indoor Environments published in ROBIO 2019. This repository includes the ROS implementation of both the original SARL and our SAR原创 2020-08-03 11:39:41 · 3087 阅读 · 4 评论 -
(已解决)pyglet报错:pyglet.window.xlib.XlibException: Could not create UTF8 text property
系统: Ubuntu 16.04python版本: 3.6使用 pyglet.window.Window() ,运行时报错:pyglet.window.xlib.XlibException: Could not create UTF8 text property解决方法:打开终端,输入:sudo dpkg-reconfigure locales找到 en_US.UTF-8,选上,确认再输入:sudo locale-gen en_US en_US.UTF-8重启,再运行不再报错reb原创 2020-07-31 22:53:09 · 1031 阅读 · 0 评论 -
(已解决)Pytorch/Tensorflow检查能否调用GPU及CUDA、Nvidia驱动和cuDNN的卸载重装
Tensorflow 未使用GPU的问题系统:Ubuntu 16.04之前按照这篇博客成功装好了 CUDA 10.2、Nvidia驱动及 cuDNN 7.6.5 ,跑mnist测试通过了。然而,跑一个基于tensorflow 1.14.0的深度学习代码时,发现训练速度特别慢。这是不应该的,因为我在运行程序时指定了使用GPU( Nvidia GTX 2080Ti)。事实证明如果直接跑别人代码而不仔细看每一个细节处理的话,就会踩这种「以为设置的参数一定是真的」的坑。。。仔细看了下终端的log,发现了几句原创 2020-05-28 20:46:14 · 9332 阅读 · 0 评论 -
(已解决)更新pip后的报错UserWarning: Setuptools will stop working on Python 2
系统:Ubuntu自从按照 terminal 里给的的提示 update 了 pip 后,每次使用 pip 安装东西总是报这个错:UserWarning: Setuptools will stop working on Python 2************************************************************You are running Se...原创 2020-04-14 21:27:42 · 9842 阅读 · 0 评论 -
Ubuntu系统下python opencv视频采集:使用USB端口映射指定要读取的相机设备
Ubuntu16.04 下 python opencv 视频采集:使用USB端口映射指定要读取的相机设备有时我们需要读取指定设备的视频流,但笔记本电脑通常自带相机,同时可能连接多个USB相机,每次插拔USB后系统自动分配的端口号可能会改变。为了省去每次在命令行里查找设备端口编号的麻烦,可以给自己想读取的设备指定名称(即进行端口映射)。本教程适用于 ubuntu 16.04 系统。使用 pyt...原创 2020-04-14 14:06:39 · 3269 阅读 · 0 评论 -
(已解决)Win10命令行中使用pip报错:pip is configured with locations that require TLS/SSL
新电脑win10系统,配置了Anaconda3想在命令行里使用pip安装一些包,结果报错:WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.查了一下貌似是环境配置的问题,尝试修改环境变量解决不了。解决方法:不运行...原创 2019-11-26 17:08:48 · 7857 阅读 · 10 评论 -
(已解决)ImportError: No module named... python2.7里的隐式相对导入问题
遇到一个在python3里import时从不报错的模块,换成python2.7环境后报错:ImportError: No module named 。。。原因是引用的模块的初始化文件__init__.py里import的文件中又import了自己这个模块,二者之间存在隐式的相对导入(github上被人称作implicit relative import) 。是个evil的问题。这个bug在p...原创 2019-04-02 14:39:05 · 2267 阅读 · 0 评论 -
(已解决)pip install时遇到ImportError: cannot import name main
pip版本更新到10以后,使用pip install报错ImportError: cannot import name main解决方法修改 /usr/bin/pip:$ sudo gedit /usr/bin/pip将from pip import main改成from pip._internal import main...原创 2019-03-08 11:26:43 · 4123 阅读 · 0 评论