IDE Record

Anaconda

Environment

Activate an environment:

conda activate en_name
#or
source activate en_name

Deactivate an environment:

conda deactivate en_name
#or
source deactivate en_name

Create a new environment:

conda create -n env_name python=x.x

List all the existing environment:

conda env list

Delete an existing environment:

conda remove --name env_name --all

requirement.txt :
generate by running:

pip install pipreqs
pipreqs .

or

conda list -e > requirements.txt

install by running:

conda install --yes --file requirements.txt

if there is a setup.py file, then running this:

pip install -e .
Run .py in the Terminal

error: undefined symbol: cublasLtHSHMatmulAlgoInit, version libcublasLt.so.11

export LD_LIBRARY_PATH=/home/linchangyi/anaconda3/envs/pytorch/lib/python3.7/site-packages/nvidia/cublas/lib/:$LD_LIBRARY_PATH

Pycharm

Create a Python interpreter:

File -> Settings -> Project:xxx -> Python Interpreter ->
Add Interpreter -> Virtualenv Environment:
Environment: Existing
Base interpreter: /home/user_name/anaconda3/envs/env_name/bin/python3.x

Create a setup.py:

File -> Tools -> Create setup.py

Add the ROS Python path for using ros in python:

1. Choose the Python interpreter used;
2. Choose 'show interpreter paths';
3. Add the ROS Python path like '/opt/ros/noetic/lib/python3/dist-packages'.

No module named ‘rospkg’

pip install rospkg
pip install pycryptodomex
pip install gnupg

Cannot find reference ‘VideoCapture’ in ‘init.py’

1. Choose the Python interpreter used;
2. Choose 'show interpreter paths';
3. Add the cv2 package path like '/home/user_name/anaconda3/envs/env_name/lib/python3.x/site-package/cv2'.

Better way to install OpenCV with QT

conda install opencv

QObject::moveToThread: Current thread (0x3cf61d0) is not the object’s thread (0x3bfb990)
Just delete other virtual anaconda environments in the Pycharm -> Settings -> Project -> Python Interpreter.

Installation

Pip:

# install
pip install lib_name
# uninstall
pip uninstall lib_name

Conda:

# install
conda install lib_name
# uninstall
conda uninstall lib_name

PyBullet

Previously, I used “pip3 install pybullet” or “conda install pybullet” and couldn’t use “import pybullet”
in PyCharm.
So, go to the official website of Anaconda and search “pybullet”.
The result is:

 conda install -c conda-forge pybullet
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值