AutoDL 云服务器:普通 用户 miniconda 配置
AutoDL 初始状态下只有root用户,miniconda 安装在root用户目录下
///
增加普通用户
root@autodl-container-1c0641804d-5bb7040c:~/Desktop# apt updateroot@autodl-container-1c0641804d-5bb7040c:~/Desktop# apt install sudoroot@autodl-container-1c0641804d-5bb7040c:~/Desktop# adduser zhenglfroot@autodl-container-1c0641804d-5bb7040c:~/Desktop# usermod -aG sudo zhenglfroot@autodl-container-1c0641804d-5bb7040c:~/Desktop# su zhenglf
普通用户conda配置
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ python
bash: python: command not found
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ conda
bash: conda: command not found
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ sudo /root/miniconda3/bin/conda init bash
no change /root/miniconda3/condabin/conda
no change /root/miniconda3/bin/conda
no change /root/miniconda3/bin/conda-env
no change /root/miniconda3/bin/activate
no change /root/miniconda3/bin/deactivate
no change /root/miniconda3/etc/profile.d/conda.sh
no change /root/miniconda3/etc/fish/conf.d/conda.fish
no change /root/miniconda3/shell/condabin/Conda.psm1
no change /root/miniconda3/shell/condabin/conda-hook.ps1
no change /root/miniconda3/lib/python3.8/site-packages/xontrib/conda.xsh
no change /root/miniconda3/etc/profile.d/conda.csh
no change /home/zhenglf/.bashrc
No action taken.
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ source /home/zhenglf/.bashrc
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ cat /home/zhenglf/.bashrc | grep conda
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/root/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"eval "$__conda_setup"if [ -f "/root/miniconda3/etc/profile.d/conda.sh" ]; then. "/root/miniconda3/etc/profile.d/conda.sh"export PATH="/root/miniconda3/bin:$PATH"
unset __conda_setup
# <<< conda initialize <<<
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ conda
bash: conda: command not found
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ sudo chmod -R 777 /root
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ conda
usage: conda [-h] [-V] command ...conda is a tool for managing and deploying applications, environments and packages.Options:positional arguments:commandclean Remove unused packages and caches.compare Compare packages between conda environments.config Modify configuration values in .condarc. This is modeled after the git config command. Writes to the user .condarc file (/home/zhenglf/.condarc) by default.create Create a new conda environment from a list of specified packages.help Displays a list of available conda commands and their help strings.info Display information about current conda install.init Initialize conda for shell interaction. [Experimental]install Installs a list of packages into a specified conda environment.list List linked packages in a conda environment.package Low-level conda package utility. (EXPERIMENTAL)remove Remove a list of packages from a specified conda environment.uninstall Alias for conda remove.run Run an executable in a conda environment. [Experimental]search Search for packages and display associated information. The input is a MatchSpec, a query language for conda packages. See examples below.update Updates conda packages to the latest compatible version.upgrade Alias for conda update.optional arguments:-h, --help Show this help message and exit.-V, --version Show the conda version number and exit.conda commands available from other packages:env
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ conda env list
# conda environments:
#
base * /root/miniconda3zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ conda activate baseCommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run$ conda init <SHELL_NAME>Currently supported shells are:- bash- fish- tcsh- xonsh- zsh- powershellSee 'conda init --help' for more information and options.IMPORTANT: You may need to close and restart your shell after running 'conda init'.zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ source /root/miniconda3/bin/activate
(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ conda deactivate
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ conda activate base
(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ which python
/root/miniconda3/bin/python
(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ history1 sudo /root/miniconda3/bin/conda init bash2 cat /home/zhenglf/.bashrc3 python4 python35 source /home/zhenglf/.bashrc6 python7 reset8 python9 conda10 sudo /root/miniconda3/bin/conda init bash11 cat /home/zhenglf/.bashrc12 cat /home/zhenglf/.bashrc | grep conda13 reset14 python15 conda16 sudo /root/miniconda3/bin/conda init bash17 source /home/zhenglf/.bashrc18 cat /home/zhenglf/.bashrc | grep conda19 conda20 sudo chmod -R 777 /root21 conda22 conda env list23 conda activate base24 source /root/miniconda3/bin/activate25 conda deactivate26 conda activate base27 which python28 history
(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
///
相关文章:
AutoDL 云服务器:普通 用户 miniconda 配置
AutoDL 初始状态下只有root用户,miniconda 安装在root用户目录下 /// 增加普通用户 rootautodl-container-1c0641804d-5bb7040c:~/Desktop# apt updaterootautodl-container-1c0641804d-5bb7040c:~/Desktop# apt install sudorootautodl-container-1c0641804d-5…...

渲染流程概述
渲染流程包括 CPU应用程序端渲染逻辑 和 GPU渲染管线 一、CPU应用程序端渲染逻辑 剔除操作对物体进行渲染排序打包数据调用Shader SetPassCall 和 Drawcall 1.剔除操作 视椎体剔除 (给物体一个包围盒,利用包围盒和摄像机的视椎体进行碰撞检测…...
前端力扣刷题 | 4:hot100之 子串
560. 和为K的子数组 给你一个整数数组 nums 和一个整数 k ,请你统计并返回 该数组中和为 k 的子数组的个数 。 子数组是数组中元素的连续非空序列。 示例: 输入:nums [1,1,1], k 2 输出:2 法一:暴力法 var subar…...
Julia 之 @btime 精准测量详解
Julia 语言因其高性能和易用性在科学计算、数据分析等领域获得了广泛关注。在性能优化中,精准测量代码执行时间是至关重要的任务,而 Julia 提供了强大的工具 btime 来辅助这一任务。本文将围绕 Julia 的 btime 来展开,帮助读者深入理解并高效…...
【Django教程】用户管理系统
Get Started With Django User Management 开始使用Django用户管理 By the end of this tutorial, you’ll understand that: 在本教程结束时,您将了解: Django’s user authentication is a built-in authentication system that comes with pre-conf…...
【机器学习】自定义数据集 使用pytorch框架实现逻辑回归并保存模型,然后保存模型后再加载模型进行预测
一、使用pytorch框架实现逻辑回归 1. 数据部分: 首先自定义了一个简单的数据集,特征 X 是 100 个随机样本,每个样本一个特征,目标值 y 基于线性关系并添加了噪声。将 numpy 数组转换为 PyTorch 张量,方便后续在模型中…...

C语言连接Mysql
目录 C语言连接Mysql下载 mysql 开发库 方法介绍mysql_init()mysql_real_connect()mysql_query()mysql_store_result()mysql_num_fields()mysql_fetch_fields()mysql_fetch_row()mysql_free_result()mysql_close() 完整代码 C语言连接Mysql 下载 mysql 开发库 方法一…...

Windows上通过Git Bash激活Anaconda
在Windows上配置完Anaconda后,普遍通过Anaconda Prompt激活虚拟环境并执行Python,如下图所示: 有时需要连续执行多个python脚本时,直接在Anaconda Prompt下可以通过在以下方式,即命令间通过&&连接,…...

面试经典150题——图
文章目录 1、岛屿数量1.1 题目链接1.2 题目描述1.3 解题代码1.4 解题思路 2、被围绕的区域2.1 题目链接2.2 题目描述2.3 解题代码2.4 解题思路 3、克隆图3.1 题目链接3.2 题目描述3.3 解题代码3.4 解题思路 4、除法求值4.1 题目链接4.2 题目描述4.3 解题代码4.4 解题思路 5、课…...

学习数据结构(1)时间复杂度
1.数据结构和算法 (1)数据结构是计算机存储、组织数据的方式,指相互之间存在⼀种或多种特定关系的数据元素的集合 (2)算法就是定义良好的计算过程,取一个或一组的值为输入,并产生出一个或一组…...

项目集成GateWay
文章目录 1.环境搭建1.创建sunrays-common-cloud-gateway-starter模块2.目录结构3.自动配置1.GateWayAutoConfiguration.java2.spring.factories 3.pom.xml4.注意:GateWay不能跟Web一起引入! 1.环境搭建 1.创建sunrays-common-cloud-gateway-starter模块…...
【Ubuntu】使用远程桌面协议(RDP)在Windows上远程连接Ubuntu
使用远程桌面协议(RDP)在Windows上远程连接Ubuntu 远程桌面协议(RDP)是一种允许用户通过图形界面远程控制计算机的协议。本文将详细介绍如何在Ubuntu上安装和配置xrdp,并通过Windows的远程桌面连接工具访问Ubuntu。 …...
python3+TensorFlow 2.x 基础学习(一)
目录 TensorFlow 2.x基础 1、安装 TensorFlow 2.x 2、TensorFlow 2.x 基础概念 2、1 Eager Execution 2、2 TensorFlow 张量(Tensor) 3、使用Keras构建神经网络模型 3、1 构建 Sequential 模型 3、2 编译模型 1、Optimizer(优化器&a…...
《活出人生的厚度》
《活出人生的厚度》可以从不同角度来理解和实践,以下为你提供一些拓展内容: ### 不断学习与自我提升 - **持续知识更新**:保持对新知识的渴望,利用各种渠道学习,如在线课程、学术讲座、行业研讨会等。例如,…...

安装 docker 详解
在平常的开发工作中,我们经常需要部署项目。随着 Docker 容器的出现,大大提高了部署效率。Docker 容器包含了应用程序运行所需的所有依赖,避免了换环境运行问题。可以在短时间内创建、启动和停止容器,大大提高了应用的部署速度&am…...

【Rust自学】16.3. 共享状态的并发
喜欢的话别忘了点赞、收藏加关注哦(加关注即可阅读全文),对接下来的教程有兴趣的可以关注专栏。谢谢喵!(・ω・) 16.3.1. 使用共享来实现并发 还记得Go语言有一句名言是这么说的:Do not commun…...
开发者交流平台项目部署到阿里云服务器教程
本文使用PuTTY软件在本地Windows系统远程控制Linux服务器;其中,Windows系统为Windows 10专业版,Linux系统为CentOS 7.6 64位。 1.工具软件的准备 maven:https://archive.apache.org/dist/maven/maven-3/3.6.1/binaries/apache-m…...

【2024年华为OD机试】 (B卷,100分)- 乘坐保密电梯(JavaScriptJava PythonC/C++)
一、问题描述 问题描述 我们需要从0楼到达指定楼层m,乘坐电梯的规则如下: 给定一个数字序列,每次根据序列中的数字n,上升n层或下降n层。前后两次的方向必须相反,且首次方向向上。必须使用序列中的所有数字,不能只使用一部分。目标是到达指定楼层m,如果无法到达,则给出…...

maven的打包插件如何使用
默认的情况下,当直接执行maven项目的编译命令时,对于结果来说是不打第三方包的,只有一个单独的代码jar,想要打一个包含其他资源的完整包就需要用到maven编译插件,使用时分以下几种情况 第一种:当只是想单纯…...
solidity高阶 -- 线性继承
Solidity是一种面向合约的高级编程语言,用于编写智能合约。在Solidity中,多线继承是一个强大的特性,允许合约从多个父合约继承属性和方法。本文将详细介绍Solidity中的多线继承,并通过不同的实例展示其使用方法和注意事项。 在Sol…...
论文解读:交大港大上海AI Lab开源论文 | 宇树机器人多姿态起立控制强化学习框架(二)
HoST框架核心实现方法详解 - 论文深度解读(第二部分) 《Learning Humanoid Standing-up Control across Diverse Postures》 系列文章: 论文深度解读 + 算法与代码分析(二) 作者机构: 上海AI Lab, 上海交通大学, 香港大学, 浙江大学, 香港中文大学 论文主题: 人形机器人…...

python打卡day49
知识点回顾: 通道注意力模块复习空间注意力模块CBAM的定义 作业:尝试对今天的模型检查参数数目,并用tensorboard查看训练过程 import torch import torch.nn as nn# 定义通道注意力 class ChannelAttention(nn.Module):def __init__(self,…...

【人工智能】神经网络的优化器optimizer(二):Adagrad自适应学习率优化器
一.自适应梯度算法Adagrad概述 Adagrad(Adaptive Gradient Algorithm)是一种自适应学习率的优化算法,由Duchi等人在2011年提出。其核心思想是针对不同参数自动调整学习率,适合处理稀疏数据和不同参数梯度差异较大的场景。Adagrad通…...

渗透实战PortSwigger靶场-XSS Lab 14:大多数标签和属性被阻止
<script>标签被拦截 我们需要把全部可用的 tag 和 event 进行暴力破解 XSS cheat sheet: https://portswigger.net/web-security/cross-site-scripting/cheat-sheet 通过爆破发现body可以用 再把全部 events 放进去爆破 这些 event 全部可用 <body onres…...

UDP(Echoserver)
网络命令 Ping 命令 检测网络是否连通 使用方法: ping -c 次数 网址ping -c 3 www.baidu.comnetstat 命令 netstat 是一个用来查看网络状态的重要工具. 语法:netstat [选项] 功能:查看网络状态 常用选项: n 拒绝显示别名&#…...

Java-41 深入浅出 Spring - 声明式事务的支持 事务配置 XML模式 XML+注解模式
点一下关注吧!!!非常感谢!!持续更新!!! 🚀 AI篇持续更新中!(长期更新) 目前2025年06月05日更新到: AI炼丹日志-28 - Aud…...
C++ 基础特性深度解析
目录 引言 一、命名空间(namespace) C 中的命名空间 与 C 语言的对比 二、缺省参数 C 中的缺省参数 与 C 语言的对比 三、引用(reference) C 中的引用 与 C 语言的对比 四、inline(内联函数…...
css的定位(position)详解:相对定位 绝对定位 固定定位
在 CSS 中,元素的定位通过 position 属性控制,共有 5 种定位模式:static(静态定位)、relative(相对定位)、absolute(绝对定位)、fixed(固定定位)和…...
Web 架构之 CDN 加速原理与落地实践
文章目录 一、思维导图二、正文内容(一)CDN 基础概念1. 定义2. 组成部分 (二)CDN 加速原理1. 请求路由2. 内容缓存3. 内容更新 (三)CDN 落地实践1. 选择 CDN 服务商2. 配置 CDN3. 集成到 Web 架构 …...

短视频矩阵系统文案创作功能开发实践,定制化开发
在短视频行业迅猛发展的当下,企业和个人创作者为了扩大影响力、提升传播效果,纷纷采用短视频矩阵运营策略,同时管理多个平台、多个账号的内容发布。然而,频繁的文案创作需求让运营者疲于应对,如何高效产出高质量文案成…...