Home
Sign Up
Sign In
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member
Sign In
Distributions
›
Ubuntu
›
Fedora
›
CentOS
中文资源站
›
网易开源镜像站
V2EX
›
Linux
centos 软连接问题
marktask
·
Aug 18, 2021
· 1555 views
This topic created in 1721 days ago, the information mentioned may be changed or developed.
服务器上已经安装了 python3.6,由用户因为编译的库使用的是 python3.8 。现在将环境迁移到服务器上,也在用户目录里面安装了 python3.8,但是尝试将用户目录下的 python3.8 软连接到 python3 上,运行无报错,使用 python3 时候依然是 3.6 的。将 python3.8 添加到用户的环境变量里面依然也是调用系统的 3.6.应该怎么调用 3.8 呢?
Python
Python3
调用
目录
3 replies
1
AoEiuV020
Aug 18, 2021
不明觉厉,总之先排查一下,type python3 看看指向哪里,然后检查 PATH,确认 3.8 所在目录先于 3.6 所在目录,
2
marktask
OP
Aug 18, 2021
指向 3.6 环境变量 3.8 先于 3.6 即可?
@
AoEiuV020
#1
3
AoEiuV020
Aug 18, 2021
@
marktask
要知道 shell 找程序的逻辑,
是在 PATH 变量中一个目录一个目录的找,
比如第三个目录里有 python3.6 和 python3, 第四个目录里有 python3.8 和 python3,
这样输入 python3.8 就会执行第四个目录的 python3.8,
输入 python3 就会执行第三个目录的 python3,也就是 python3.6,
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Solana
·
2633 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 29ms ·
UTC 11:10
·
PVG 19:10
·
LAX 04:10
·
JFK 07:10
♥ Do have faith in what you're doing.
❯