Python环境构建
一、概览
1、Python数据类型
int 整形 4字节 例如:10 20 18
float 浮点型 例如:3.1415926 4.0
char 字符 例如:‘a’ ‘b’ ‘男’
String 字符串 例如:“abc” “你好” “世界万物皆为字符串”
boolean 布尔 例如:true false 只有这两种值
二、实验
1、linux环境安装
python --version //查看系统自带的版本
python //进入python环境
print('hello') //打印hello字符串
exit() //退出python环境
##安装步骤如下所示
yum install -y openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel libffi-devel gcc gcc-c++
cd /opt
tar zxvf Python-3.7.0.tgz
cd Python-3.7.0/
./configure --prefix=/usr/local/python3
make && make install
cd /usr/local/python3/bin
./python3
print('hellow world')
exit()
ln -s /usr/local/python3/bin/python3.7 /usr/bin/python3
python3
print('abc')
exit()
2、win10环境安装
安装的是Python2020.2
链接:https://pan.baidu.com/s/1dPB1tinZz3I5z7YiiilqQA
提取码:6681
网上找了很多注册码,不管用的,只有这个是目前是没有错误,正常注册成功的,没有时间限制
三、问题
问题描述
Windows10 下python不能运行,报错信息如下所示:
Python was not found but can be installed from the Microsoft Store: https://go.microsoft.com/fwlink
在菜单栏下,输入“管理应用执行别名”,点进去
把这俩设置为关闭状态即可。