1
kindjeff 2017-05-05 07:58:29 +08:00 via iPhone
不能用是什么意思,你敲 python3.5 回车没反应,还是切到 python3.5 的目录运行不了?
|
2
zsz 2017-05-05 08:03:55 +08:00 via iPhone 1
终端下切到 python3.5 安装位置,手动运行下看看
加我们的群问效率更高,一群工程师组建的面向初学者的 Python Linux 学习群,qq 群号:278529278, Php Linux 学习群,qq 群号:476648701, 非商业性质,拒绝广告,只接收真正想学这方面技术的朋友,交流学习,申请请说明来自 v2ex |
3
zhaojjxvi 2017-05-05 08:04:43 +08:00 via iPhone
Pycharm 也不自带 Python3 啊,应该是你给配的环境变量啊什么的用的 3.5
|
4
KeepPro 2017-05-05 08:08:45 +08:00 via Android 1
ide 配置的绝对路径,终端里面你也用全路径就行
|
5
arischow 2017-05-05 08:18:33 +08:00 via iPhone
pyenv
|
6
Tink 2017-05-05 08:38:07 +08:00 via iPhone
环境变量的问题吧
|
7
LokiSharp 2017-05-05 08:58:11 +08:00 1
cd bin
mv python python.bak ln -s pythonXY python 在 bin 里面的 python* 全都是以软连接的形式存在的 想要改 python 版本自己重建软连接就行了。 |
8
zhengxiaowai 2017-05-05 10:36:32 +08:00
环境变量问题
|
9
richardma 2017-05-05 20:34:55 +08:00
为何不用 virtualenv ?
|
11
Ferrix OP @zhaojjxvi 恩,PyCharm 可以选择 project interpreter,因为之前很多包都装在了 3.5 中
|
14
Ferrix OP 昨天有事没用电脑,多谢各位的热心解答
|
17
LokiSharp 2017-05-06 09:34:58 +08:00 via iPhone 1
$ ll python*
lrwxrwxrwx 1 root root 7 Jan 17 21:24 python -> python2 lrwxrwxrwx 1 root root 9 Jan 17 21:24 python2 -> python2.7 -rwxr-xr-x 1 root root 7136 Nov 6 08:29 python2.7 -rwxr-xr-x 1 root root 1835 Nov 6 08:29 python2.7-config -rwxr-xr-x 1 root root 304 Dec 13 19:49 python2.7-futurize -rwxr-xr-x 1 root root 308 Dec 13 19:49 python2.7-pasteurize lrwxrwxrwx 1 root root 16 Jan 17 23:28 python2-config -> python2.7-config -rwxr-xr-x 1 root root 11312 Dec 29 09:58 python3 -rwxr-xr-x 2 root root 11312 Nov 10 00:27 python3.4 -rwxr-xr-x 2 root root 11312 Nov 10 00:27 python3.4m -rwxr-xr-x 2 root root 11312 Apr 7 22:35 python3.6 -rwxr-xr-x 2 root root 11312 Apr 7 22:35 python3.6m lrwxrwxrwx 1 root root 9 Jan 17 23:31 python3.bak -> python3.4 lrwxrwxrwx 1 root root 14 Jan 17 23:28 python-config -> python2-config |
18
xray887 2017-05-23 09:53:06 +08:00
➜ /Users/xray887 >which python
/usr/local/bin/python ➜ /Users/xray887 >cd /usr/local/bin ➜ /usr/local/bin >ll python* lrwxr-xr-x 1 xray887 admin 34B 12 28 20:45 python -> ../Cellar/python/2.7.13/bin/python lrwxr-xr-x 1 xray887 wheel 71B 11 26 2015 python-32 -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python-32 lrwxr-xr-x 1 xray887 admin 41B 12 28 20:45 python-config -> ../Cellar/python/2.7.13/bin/python-config lrwxr-xr-x 1 xray887 admin 35B 12 28 20:45 python2 -> ../Cellar/python/2.7.13/bin/python2 lrwxr-xr-x 1 xray887 wheel 72B 11 26 2015 python2-32 -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python2-32 lrwxr-xr-x 1 xray887 admin 42B 12 28 20:45 python2-config -> ../Cellar/python/2.7.13/bin/python2-config lrwxr-xr-x 1 xray887 admin 37B 12 28 20:45 python2.7 -> ../Cellar/python/2.7.13/bin/python2.7 lrwxr-xr-x 1 xray887 wheel 74B 11 26 2015 python2.7-32 -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-32 lrwxr-xr-x 1 xray887 admin 44B 12 28 20:45 python2.7-config -> ../Cellar/python/2.7.13/bin/python2.7-config lrwxr-xr-x 1 xray887 admin 35B 4 28 10:06 python3 -> ../Cellar/python3/3.6.1/bin/python3 lrwxr-xr-x 1 xray887 wheel 72B 11 13 2015 python3-32 -> ../../../Library/Frameworks/Python.framework/Versions/3.5/bin/python3-32 lrwxr-xr-x 1 xray887 admin 42B 4 28 10:06 python3-config -> ../Cellar/python3/3.6.1/bin/python3-config lrwxr-xr-x 1 xray887 wheel 74B 11 13 2015 python3.5-32 -> ../../../Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5-32 lrwxr-xr-x 1 xray887 admin 37B 4 28 10:06 python3.6 -> ../Cellar/python3/3.6.1/bin/python3.6 lrwxr-xr-x 1 xray887 admin 44B 4 28 10:06 python3.6-config -> ../Cellar/python3/3.6.1/bin/python3.6-config lrwxr-xr-x 1 xray887 admin 38B 4 28 10:06 python3.6m -> ../Cellar/python3/3.6.1/bin/python3.6m lrwxr-xr-x 1 xray887 admin 45B 4 28 10:06 python3.6m-config -> ../Cellar/python3/3.6.1/bin/python3.6m-config lrwxr-xr-x 1 xray887 admin 35B 12 28 20:45 pythonw -> ../Cellar/python/2.7.13/bin/pythonw lrwxr-xr-x 1 xray887 wheel 72B 11 26 2015 pythonw-32 -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw-32 lrwxr-xr-x 1 xray887 admin 36B 12 28 20:45 pythonw2 -> ../Cellar/python/2.7.13/bin/pythonw2 lrwxr-xr-x 1 xray887 wheel 73B 11 26 2015 pythonw2-32 -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw2-32 lrwxr-xr-x 1 xray887 admin 38B 12 28 20:45 pythonw2.7 -> ../Cellar/python/2.7.13/bin/pythonw2.7 lrwxr-xr-x 1 xray887 wheel 75B 11 26 2015 pythonw2.7-32 -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw2.7-32 |