0


pycharm安装教程,超详细

在安装pycharm之前,确保你的电脑配置好了python,没有下载安装的可以去看我的文章—>>>python安装详细教程

pycharm windows版本下载地址:https://www.jetbrains.com/pycharm/download/#section=windows
下载社区版本(日常学习使用够用了),专业版是收费的哦(功能更强大)
在这里插入图片描述
下载完后打开安装程序,点击next
在这里插入图片描述
选择一个路径然后next
在这里插入图片描述
把这些选项都勾选上。
在这里插入图片描述
点击Install
在这里插入图片描述
安装完后点击Finish
在这里插入图片描述
然后就可以开始使用了,双击桌面的pycharm快捷方式
接受,继续!
在这里插入图片描述
直接关闭或者Don’t Send.
在这里插入图片描述
点击New Project(新建一个项目)
在这里插入图片描述
选择项目所在路径—>>>选择Previously configured interpreter(需要提前下载安装好python,我这里python版本是python3.10)—>>勾选Create a main.py—>>>最后点击Create.
python安装的教程可以去看我的文章—>>>python安装详细教程
在这里插入图片描述

弹出这个直接关闭
在这里插入图片描述
鼠标右击main.py,点击运行
在这里插入图片描述
成功输出!说明配置好咯。
在这里插入图片描述
然后我们新建一个python file(右击你的项目文件夹)
在这里插入图片描述
命名一下
在这里插入图片描述
把下面代码复制粘贴过去,看看会出现什么吧。源码来自github

  1. # !/usr/bin/env python3# -*- coding: utf-8 -*-# @Author: dong# @Date: 2018-07-05 19:37:42# @Env: python 3.6# @Github: https://github.com/PerpetualSmilefrom turtle import*# 无轨迹跳跃defmy_goto(x, y):
  2. penup()
  3. goto(x, y)
  4. pendown()# 眼睛defeyes():
  5. fillcolor("#ffffff")
  6. begin_fill()
  7. tracer(False)
  8. a =2.5for i inrange(120):if0<= i <30or60<= i <90:
  9. a -=0.05
  10. lt(3)
  11. fd(a)else:
  12. a +=0.05
  13. lt(3)
  14. fd(a)
  15. tracer(True)
  16. end_fill()# 胡须defbeard():
  17. my_goto(-32,135)
  18. seth(165)
  19. fd(60)
  20. my_goto(-32,125)
  21. seth(180)
  22. fd(60)
  23. my_goto(-32,115)
  24. seth(193)
  25. fd(60)
  26. my_goto(37,135)
  27. seth(15)
  28. fd(60)
  29. my_goto(37,125)
  30. seth(0)
  31. fd(60)
  32. my_goto(37,115)
  33. seth(-13)
  34. fd(60)# 嘴巴defmouth():
  35. my_goto(5,148)
  36. seth(270)
  37. fd(100)
  38. seth(0)
  39. circle(120,50)
  40. seth(230)
  41. circle(-120,100)# 围巾defscarf():
  42. fillcolor('#e70010')
  43. begin_fill()
  44. seth(0)
  45. fd(200)
  46. circle(-5,90)
  47. fd(10)
  48. circle(-5,90)
  49. fd(207)
  50. circle(-5,90)
  51. fd(10)
  52. circle(-5,90)
  53. end_fill()# 鼻子defnose():
  54. my_goto(-10,158)
  55. seth(315)
  56. fillcolor('#e70010')
  57. begin_fill()
  58. circle(20)
  59. end_fill()# 黑眼睛defblack_eyes():
  60. seth(0)
  61. my_goto(-20,195)
  62. fillcolor('#000000')
  63. begin_fill()
  64. circle(13)
  65. end_fill()
  66. pensize(6)
  67. my_goto(20,205)
  68. seth(75)
  69. circle(-10,150)
  70. pensize(3)
  71. my_goto(-17,200)
  72. seth(0)
  73. fillcolor('#ffffff')
  74. begin_fill()
  75. circle(5)
  76. end_fill()
  77. my_goto(0,0)# defface():
  78. fd(183)
  79. lt(45)
  80. fillcolor('#ffffff')
  81. begin_fill()
  82. circle(120,100)
  83. seth(180)# print(pos())
  84. fd(121)
  85. pendown()
  86. seth(215)
  87. circle(120,100)
  88. end_fill()
  89. my_goto(63.56,218.24)
  90. seth(90)
  91. eyes()
  92. seth(180)
  93. penup()
  94. fd(60)
  95. pendown()
  96. seth(90)
  97. eyes()
  98. penup()
  99. seth(180)
  100. fd(64)# 头型defhead():
  101. penup()
  102. circle(150,40)
  103. pendown()
  104. fillcolor('#00a0de')
  105. begin_fill()
  106. circle(150,280)
  107. end_fill()# 画哆啦AdefDoraemon():# 头部
  108. head()# 围脖
  109. scarf()#
  110. face()# 红鼻子
  111. nose()# 嘴巴
  112. mouth()# 胡须
  113. beard()# 身体
  114. my_goto(0,0)
  115. seth(0)
  116. penup()
  117. circle(150,50)
  118. pendown()
  119. seth(30)
  120. fd(40)
  121. seth(70)
  122. circle(-30,270)
  123. fillcolor('#00a0de')
  124. begin_fill()
  125. seth(230)
  126. fd(80)
  127. seth(90)
  128. circle(1000,1)
  129. seth(-89)
  130. circle(-1000,10)# print(pos())
  131. seth(180)
  132. fd(70)
  133. seth(90)
  134. circle(30,180)
  135. seth(180)
  136. fd(70)# print(pos())
  137. seth(100)
  138. circle(-1000,9)
  139. seth(-86)
  140. circle(1000,2)
  141. seth(230)
  142. fd(40)# print(pos())
  143. circle(-30,230)
  144. seth(45)
  145. fd(81)
  146. seth(0)
  147. fd(203)
  148. circle(5,90)
  149. fd(10)
  150. circle(5,90)
  151. fd(7)
  152. seth(40)
  153. circle(150,10)
  154. seth(30)
  155. fd(40)
  156. end_fill()# 左手
  157. seth(70)
  158. fillcolor('#ffffff')
  159. begin_fill()
  160. circle(-30)
  161. end_fill()#
  162. my_goto(103.74,-182.59)
  163. seth(0)
  164. fillcolor('#ffffff')
  165. begin_fill()
  166. fd(15)
  167. circle(-15,180)
  168. fd(90)
  169. circle(-15,180)
  170. fd(10)
  171. end_fill()
  172. my_goto(-96.26,-182.59)
  173. seth(180)
  174. fillcolor('#ffffff')
  175. begin_fill()
  176. fd(15)
  177. circle(15,180)
  178. fd(90)
  179. circle(15,180)
  180. fd(10)
  181. end_fill()# 右手
  182. my_goto(-133.97,-91.81)
  183. seth(50)
  184. fillcolor('#ffffff')
  185. begin_fill()
  186. circle(30)
  187. end_fill()# 口袋
  188. my_goto(-103.42,15.09)
  189. seth(0)
  190. fd(38)
  191. seth(230)
  192. begin_fill()
  193. circle(90,260)
  194. end_fill()
  195. my_goto(5,-40)
  196. seth(0)
  197. fd(70)
  198. seth(-90)
  199. circle(-70,180)
  200. seth(0)
  201. fd(70)#铃铛
  202. my_goto(-103.42,15.09)
  203. fd(90)
  204. seth(70)
  205. fillcolor('#ffd200')# print(pos())
  206. begin_fill()
  207. circle(-20)
  208. end_fill()
  209. seth(170)
  210. fillcolor('#ffd200')
  211. begin_fill()
  212. circle(-2,180)
  213. seth(10)
  214. circle(-100,22)
  215. circle(-2,180)
  216. seth(180-10)
  217. circle(100,22)
  218. end_fill()
  219. goto(-13.42,15.09)
  220. seth(250)
  221. circle(20,110)
  222. seth(90)
  223. fd(15)
  224. dot(10)
  225. my_goto(0,-150)# 画眼睛
  226. black_eyes()if __name__ =='__main__':
  227. screensize(800,600,"#f0f0f0")
  228. pensize(3)# 画笔宽度
  229. speed(9)# 画笔速度
  230. Doraemon()
  231. my_goto(100,-300)
  232. write('by dongdong', font=("Bradley Hand ITC",30,"bold"))
  233. mainloop()

效果图:
在这里插入图片描述
更多python代码可以去我的专栏看看:
python实用代码
python爬虫入门
基于python和go-cqhttp实现的QQ机器人

最后教大家怎么安装第三方库。
点击pycharm下方的Termainal,输入pip install 第三方库的名称,比如pip install numpy,后面可以跟指定的版本,比如pip install numpy==1.21.0
在这里插入图片描述
出现Successfully installed …就说明安装成功了,然后他还提醒我更新pip,这个不管。
如果下载太慢的话,可以指定国内的镜像
大家如果发现下载速度很慢,可以使用国内的镜像。
命令: pip install -i 国内镜像地址 numpy
国内常用源镜像地址:

清华:https://pypi.tuna.tsinghua.edu.cn/simple

阿里云:http://mirrors.aliyun.com/pypi/simple/

中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

华中理工大学:http://pypi.hustunique.com/

山东理工大学:http://pypi.sdutlinux.org/

豆瓣:http://pypi.douban.com/simple/

例如:pip install -i https://mirrors.aliyun.com/pypi/simple/ numpy

当然安装第三方库的方法有很多种,上述描述的是我推荐的一种。

标签: pycharm python ide

本文转载自: https://blog.csdn.net/qq_44809707/article/details/122501118
版权归原作者 皮小孩ls 所有, 如有侵权,请联系我们删除。

“pycharm安装教程,超详细”的评论:

还没有评论