If you'd prefer that conda's base environment not be activated on startup, run the following command when conda is activated:
conda config --set auto_activate_base false
You can undo this by running `conda init --reverse $SHELL`? [yes|no]
根据自己需要选择即可
创建环境
1
conda create--name rl python=填python版本号
结果如下:
1 2 3 4 5 6 7 8 9 10 11 12 13
Downloading and Extracting Packages:
Preparing transaction:done Verifying transaction:done Executing transaction:done # # To activate this environment, use # # $ conda activate rl # # To deactivate an active environment, use # # $ conda deactivate
运行下列命令行,检查自己环境是否创建成功
1
conda env list
结果如下:
1 2 3 4
# conda environments: # base * /xxxx/anaconda3 rl /xxxx/anaconda3/envs/rl
× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [17 lines of output] Using setuptools (version 45.2.0). running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.8 creating build/lib.linux-x86_64-3.8/Box2D copying library/Box2D/Box2D.py -> build/lib.linux-x86_64-3.8/Box2D copying library/Box2D/__init__.py -> build/lib.linux-x86_64-3.8/Box2D creating build/lib.linux-x86_64-3.8/Box2D/b2 copying library/Box2D/b2/__init__.py -> build/lib.linux-x86_64-3.8/Box2D/b2 running build_ext building 'Box2D._Box2D' extension swigging Box2D/Box2D.i to Box2D/Box2D_wrap.cpp swig -python -c++ -IBox2D -small -O -includeall -ignoremissing -w201 -globals b2Globals -outdir library/Box2D -keyword -w511 -D_SWIG_KWARGS -o Box2D/Box2D_wrap.cpp Box2D/Box2D.i unable to execute 'swig': No such file or directory error: command 'swig' failed with exit status 1 [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for box2d-py Running setup.py clean for box2d-py Building wheel for moviepy (setup.py) ... done Created wheel for moviepy: filename=moviepy-1.0.3-py3-none-any.whl size=110730 sha256=dff0c45a7ab8b9f1a6aa63deda2acd8f111892411080fbb8d039ced27cb2fe20 Stored in directory: