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…...
vscode里如何用git
打开vs终端执行如下: 1 初始化 Git 仓库(如果尚未初始化) git init 2 添加文件到 Git 仓库 git add . 3 使用 git commit 命令来提交你的更改。确保在提交时加上一个有用的消息。 git commit -m "备注信息" 4 …...
以下是对华为 HarmonyOS NETX 5属性动画(ArkTS)文档的结构化整理,通过层级标题、表格和代码块提升可读性:
一、属性动画概述NETX 作用:实现组件通用属性的渐变过渡效果,提升用户体验。支持属性:width、height、backgroundColor、opacity、scale、rotate、translate等。注意事项: 布局类属性(如宽高)变化时&#…...
智慧工地云平台源码,基于微服务架构+Java+Spring Cloud +UniApp +MySql
智慧工地管理云平台系统,智慧工地全套源码,java版智慧工地源码,支持PC端、大屏端、移动端。 智慧工地聚焦建筑行业的市场需求,提供“平台网络终端”的整体解决方案,提供劳务管理、视频管理、智能监测、绿色施工、安全管…...
AtCoder 第409场初级竞赛 A~E题解
A Conflict 【题目链接】 原题链接:A - Conflict 【考点】 枚举 【题目大意】 找到是否有两人都想要的物品。 【解析】 遍历两端字符串,只有在同时为 o 时输出 Yes 并结束程序,否则输出 No。 【难度】 GESP三级 【代码参考】 #i…...
汽车生产虚拟实训中的技能提升与生产优化
在制造业蓬勃发展的大背景下,虚拟教学实训宛如一颗璀璨的新星,正发挥着不可或缺且日益凸显的关键作用,源源不断地为企业的稳健前行与创新发展注入磅礴强大的动力。就以汽车制造企业这一极具代表性的行业主体为例,汽车生产线上各类…...
屋顶变身“发电站” ,中天合创屋面分布式光伏发电项目顺利并网!
5月28日,中天合创屋面分布式光伏发电项目顺利并网发电,该项目位于内蒙古自治区鄂尔多斯市乌审旗,项目利用中天合创聚乙烯、聚丙烯仓库屋面作为场地建设光伏电站,总装机容量为9.96MWp。 项目投运后,每年可节约标煤3670…...
【2025年】解决Burpsuite抓不到https包的问题
环境:windows11 burpsuite:2025.5 在抓取https网站时,burpsuite抓取不到https数据包,只显示: 解决该问题只需如下三个步骤: 1、浏览器中访问 http://burp 2、下载 CA certificate 证书 3、在设置--隐私与安全--…...
[10-3]软件I2C读写MPU6050 江协科技学习笔记(16个知识点)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16...
拉力测试cuda pytorch 把 4070显卡拉满
import torch import timedef stress_test_gpu(matrix_size16384, duration300):"""对GPU进行压力测试,通过持续的矩阵乘法来最大化GPU利用率参数:matrix_size: 矩阵维度大小,增大可提高计算复杂度duration: 测试持续时间(秒&…...
高效线程安全的单例模式:Python 中的懒加载与自定义初始化参数
高效线程安全的单例模式:Python 中的懒加载与自定义初始化参数 在软件开发中,单例模式(Singleton Pattern)是一种常见的设计模式,确保一个类仅有一个实例,并提供一个全局访问点。在多线程环境下,实现单例模式时需要注意线程安全问题,以防止多个线程同时创建实例,导致…...
