anaconda - Conda virtual environment keeps using wrong version of Python
问题描述
I'm using Anaconda to create virtual environments. I've never had this problem before, but recently when I moved servers I noticed that every time I create a new virtual environment and activate it, it uses the wrong path for conda
and python
. Not to mention that typing python3
also returns a Python 3.6.9 version rather than the 3.8.5 version that I normally use with my base environment.
Here are the outputs for the stuff:
(base) user@server:/home/user$ which conda
/home/user/anaconda3/bin/conda
(base) user@server:/home/user$ which python
/home/user/anaconda3/bin/python
(base) user@server:/home/user$ conda activate venv
(venv) user@server:/home/user$ which conda
/home/user/anaconda3/condabin/conda
(venv) user@server:/home/user$ which python
/usr/bin/python
When I would use Anaconda virtual environments before, most of the paths were in /home/user/anaconda3/envs/
and not condabin
. Does anybody know what I can do to fix this issue? Thanks.
解决方案
推荐阅读
- laravel - 如果在 Laravel 上访问 home '/' 路由,如何自动重定向
- oracle - How can I skip printing an SQL script but still show the DBMS values?
- bash - 当 ssh 到远程主机时,我如何知道远程主机上运行的 bash pid?
- r - t 在 R 中起作用。它不像看起来那样出来
- javascript - 有没有办法用javascript找到字符串来自哪个txt文件?
- php - AJAX:如何将动态创建的表行中的数据保存到数据库中?
- angular - 从 Angular 7 传递数据时,API 获取 0 httpRequest 文件计数
- java - 如何使用具有简单日志语句的 Spock 在 Java 中测试 catch 块
- git - Git 提交失败,因为需要 lint
- php - 如何从数据库中选择多个数据并将其分配到会话中?