ubuntu22.04 HP新机器双系统配置、安装五笔wb、onlyoffice、pyenv、pipenv和虚拟环境virtualenv

双系统配置

在这里插入图片描述
在这里插入图片描述需要擦除原有的安全金钥
在这里插入图片描述

HP启用高性能模式

更改以下四项配置在这里插入图片描述在这里插入图片描述在这里插入图片描述在这里插入图片描述

wb安装方法

在这里插入图片描述
重新开机后右上角点击输入法,在下面打开的界面可以点击配置
在这里插入图片描述

在这里插入图片描述
左下角shift可快速切换五笔和英文 输入

john@john-hp:~$ sudo apt-get install fcitx-table-wbpy
john@john-hp:~$ sudo apt-get install fcitx-googlepinyin
john@john-hp:~$ sudo apt-get install fcitx-table-all

1.打开终端,在终端中输入:

sudo wget http://www.xiit.cn/wp-content/uploads/2011/03/vissible-ibus.tar.gz
tar -zxvf vissible-ibus.tar.gz
sudo cp vissible.db /usr/share/ibus-table/tables
sudo cp vissible.gif /usr/share/ibus-table/icons

2.重启ibus(ibus可以在系统-首选项-键盘输入法中打开),点击输入法图标-首选项-输入法-选择输入法-汉语,选择其中的极点五笔输入法,OK。

onlyoffice

john@john-hp:~/xilinx$ sudo snap install onlyoffice-desktopeditors
https://www.onlyoffice.com/zh/download-desktop.aspx
在这里插入图片描述

安装pyenv

git clone https://github.com/pyenv/pyenv.git ~/.pyenv
这一步需要联网,有时候服务器没连接外网的情况下,需要自行下载pyenv.zip包,解压到~/.pyenv 文件夹下。
cd ~/.pyenv && src/configure && make -C src
同样安装pyenv-virtualenv:
git clone https://github.com/pyenv/pyenv-virtualenv.git ( p y e n v r o o t ) / p l u g i n s / p y e n v − v i r t u a l e n v 放置到 (pyenv root)/plugins/pyenv-virtualenv 放置到 (pyenvroot)/plugins/pyenvvirtualenv放置到(pyenv root)/plugins/pyenv-virtualenv
打开~/.bashrc,增加以下4行,然后source ~/.bashrc
#export PATH=~/.pyenv/bin:KaTeX parse error: Expected 'EOF', got '#' at position 6: PATH #̲export PYENV_RO…PATH
eval “ ( p y e n v i n i t − ) " e v a l " (pyenv init -)" eval " (pyenvinit)"eval"(pyenv virtualenv-init -)”

install pipenv

before install, delete all pipenv remain files
john@john-hp:/usr/lib/python3/dist-packages$ pip3 install pipenv
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pipenv in /usr/lib/python3/dist-packages (11.9.0)
john@john-hp:/usr/lib/python3/dist-packages$ sudo mv pipenv pipenv1
john@john-hp:/usr/lib/python3/dist-packages$ sudo mv pipenv-11.9.0.egg-info pipenv-11.9.0.egg-info1

john@john-hp:/usr/lib/python3/dist-packages$ pip3 install pipenv
在这里插入图片描述
add pipenv path
/home/john/.local/bin

virtualenv

john@john-hp:~/yolov3$ ~/.local/bin/pipenv --python 3.7.4
Warning: Python 3.7.4 was not found on your system…
Would you like us to install CPython 3.7.4 with Pyenv? [Y/n]: y
Installing CPython 3.7.4 with /home/john/.pyenv/bin/pyenv (this may take a few minutes)…
✔ Success!
⠦ Installing python…
Creating a virtualenv for this project…
Pipfile: /home/john/yolov3/Pipfile
Using /home/john/.pyenv/versions/3.7.4/bin/python3.7m (3.7.4) to create virtualenv…
⠹ Creating virtual environment…created virtual environment CPython3.7.4.final.0-64 in 166ms
creator CPython3Posix(dest=/home/john/.local/share/virtualenvs/yolov3-vjGGpW9A, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/john/.local/share/virtualenv)
added seed packages: pip24.0, setuptools68.0.0, wheel==0.42.0
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

✔ Successfully created virtual environment!
Virtualenv location: /home/john/.local/share/virtualenvs/yolov3-vjGGpW9A
Warning: Your Pipfile requires python_version 3.6, but you are using 3.7.4 (/home/john/.local/share/v/y/bin/python).
$ pipenv --rm and rebuilding the virtual environment may resolve the issue.
$ pipenv check will surely fail.

在这里插入图片描述
delete again pipenv --rm and delete pipfile file manually, reinstall again:
在这里插入图片描述

Create a new project using Python 3.7, specifically:
$ pipenv --python 3.7

Remove project virtualenv (inferred from current directory):
$ pipenv --rm

Install all dependencies for a project (including dev):
$ pipenv install --dev

Create a lockfile containing pre-releases:
$ pipenv lock --pre

Show a graph of your installed dependencies:
$ pipenv graph

Check your installed dependencies for security vulnerabilities:
$ pipenv check

Install a local setup.py into your virtual environment/Pipfile:
$ pipenv install -e .

Use a lower-level pip command:
$ pipenv run pip freeze

PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python

john@john-hp:~/yolov3$ echo PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python >> .env
john@john-hp:~/yolov3$ cat .env
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
在这里插入图片描述

(yolov3) john@john-hp:~/yolov3/yolov3_keras$ python3 yolo_video.py –image
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:

  1. Downgrade the protobuf package to 3.20.x or lower.
  2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
在这里插入图片描述

(yolov3) john@john-hp:~/yolov3/yolov3_keras$ export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
(yolov3) john@john-hp:~/yolov3/yolov3_keras$ python3 yolo_video.py –image

opencv-contrib-python==4.6.0.66

(yolov3) john@john-hp:~/yolov3/yolov3_keras$ pip3 install opencv-contrib-python==4.6.0.66 -i https://pypi.tuna.tsinghua.edu.cn/simple
Traceback (most recent call last):
File “yolo_video.py”, line 76, in
detect_video(YOLO(**vars(FLAGS)), FLAGS.input, FLAGS.output)
File “/home/john/yolov3/yolov3_keras/yolo.py”, line 205, in detect_video
fontScale=0.50, color=(255, 0, 0), thickness=2)
cv2.error: OpenCV(4.10.0) 👎 error: (-5:Bad argument) in function ‘putText’

Overload resolution failed:

  • img marked as output argument, but provided NumPy array marked as readonly
  • Expected Ptrcv::UMat for argument ‘img’
    在这里插入图片描述
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值