pycharm

Using PyCharm I want to show plot extra figure windows

强颜欢笑 提交于 2020-05-12 21:08:38
问题 After installing Anaconda3 & PyCharm in new PC, I tried to test the same code as uploaded here And I got a window like this. But usually I use the plot window like this format (from google image search) I think the first view is useful for checking all of the plots, but I'm already used to the second version, separated plot figure from PyCharm console, and I can use the control panel. So I want to use PyCharm as in the second picture. How can I change my PyCharm settings to use the second

Get PyCharm to know what classes are mixin for

ε祈祈猫儿з 提交于 2020-05-11 04:35:07
问题 Our application has set of complex form wizards. To avoid code duplication I created several mixins. The problem is that PyCharm highlights mixin methods with Unresolved attribute refference error. This is correct as object does not have such methods. But I know that this mixin will be used only with special classes. Is there any way to tell this info to PyCharm? For now I use such approach: class MyMixin(object): def get_context_data(self, **kwargs): assert isinstance(self,

PyCharm IDE how can I change font size with out zooming with mouse scroll

浪子不回头ぞ 提交于 2020-05-09 18:42:19
问题 As title says, how can I change the font size in editor by some value. I like the scrolling thing, but the problem is I have to scroll again and every time I open an IDE again. I found the settings for changing the value of the font size, but it's disabled. Do I have to pay for that feature ? 回答1: version 2017.1 and older -- Settings/Preferences | Editor | Colors & Fonts | Font since 2017.2 -- Settings/Preferences | Editor | Color Scheme | Color Scheme Font I found the settings for changing

When I assign a list to variable why Pycharm give me a prompt that is “this list creation could be rewritten as a list literal”?

橙三吉。 提交于 2020-05-09 18:32:34
问题 I am a Python beginner and have a puzzle. When I write code like this: lst = [1, 2, 3, 4] Pycharm give me a prompt that is "this list creation could be rewritten as a list literal". But if it's replaced by lst = list([1, 2, 3, 4]) Pycharm doesn't say anything. Who could tell me why? Is this code like lst = [1, 2, 3, 4] legal in Python? Can I ignore prompt? 回答1: Check your code to make sure you don't have lst somewhere else as lst=[] . If you type the following: lst= [] # more code lst = [1, 2

mac安装完anaconda后,环境变量设置

社会主义新天地 提交于 2020-05-09 16:32:30
环境:MacOS Sierra 10.12.3;PyCharm Community Edition 2017.1 1. 安装Anaconda:从 https://www.continuum.io/downloads/ 下载 python 2.7 version中的图形界面版本或者命令行版本(根据自己的需要),然后在terminal中执行命令bash Anaconda2-4.3.1-MacOS-x86_64.sh 2. 这个时候在终端里面输入conda 是无法识别这个这个命令的,需要添加环境变量。 在terminal中执行以下命令(需要根据自己anaconda的安装路径作出调整): export PATH=~/anaconda2/bin:$PATH 这时在terminal里面输入conda就可以给出命令信息了,这样可以检验你的conda是不是可以用。 来源: oschina 链接: https://my.oschina.net/u/4350688/blog/4272065

【软件安装教程】python模块的安装

佐手、 提交于 2020-05-09 16:23:36
#官网: https://www.python.org/ # python 模块的安装,可先去 python 库里下载安装包,本地安装; 也可直接使用cmd / Anacoda 等工具 在线安装 # python 库 https://www.cnblogs.com/lgx-fighting/p/9398721.html 1.python爬虫常用第三方库: https://blog.csdn.net/woshisunchi/article/details/60877817 2.python数据挖掘常用包: https://blog.csdn.net/sunflower606/article/details/49738107 3.库: https://pypi.org/ https://pypi.org/search/?q=scipy https://pypi.org/simple/tensorflow/ https://www.lfd.uci.edu/~gohlke/pythonlibs/#wordcloud https://code.google.com/archive/p/pyodbc/downloads https://digi.bib.uni-mannheim.de/tesseract/ https://mirrors.tuna.tsinghua.edu.cn/ 1、使用

【2020Python修炼记】MySQL之 数据备份、pymysql模块

六月ゝ 毕业季﹏ 提交于 2020-05-09 15:25:07
【目录】 一、IDE工具介绍与安装使用——navicat 神器 二、MySQL数据备份 三、pymysql模块 1、安装 2、使用模块 一、IDE工具介绍与安装使用——navicat 神器 https://www.cnblogs.com/bigorangecc/p/12851845.html 二、MySQL数据备份 https://zhuanlan.zhihu.com/p/115504709 三、pymysql模块 模块安装包下载官网: https://pypi.org/search/?q=pymysql 其他下载地址,参考博客 https://www.cnblogs.com/bigorangecc/p/12852337.html 1、安装 方法一:cmd 中输入指令 pip install pymysql (pip 未规定具体版本) 方法二:直接在 pycharm中安装 (1)傻瓜式 先新建一个python文件,输入代码 import pymysql 此时你会发现,pymysql下面标有红线,光标移至pymysql,查看错误提示,神奇地发现 有“install package pymysql”,点击即可安装 (2)专业式 pycharm 软件中,菜单栏【文件】——【设置】——【项目】——【Project Interpreter】——点击 + 号 搜索需要安装的模块包 方法三

只要网速够快,小视频看完一个删一个,任性!Python爬取小视频

被刻印的时光 ゝ 提交于 2020-05-09 09:42:50
前言 yy平台,直播界的先驱,有很多主播会把一些自己的直播精彩看点上传到该平台下的小视频栏目中 今天带大家爬取yy小视频栏目中所有的小视频 课程知识点: 1、动态数据抓包演示 2、json数据解析方法 3、视频数据保存 环境介绍: python 3.6 pycharm requests 爬虫的一般思路: 1、分析目标网页,确定爬取的url路径,headers参数 2、发送请求 -- requests 模拟浏览器发送请求,获取响应数据 3、解析数据 4、保存数据 导入工具 import requests import re import pprint 分析目标网页,确定爬取的url路径,headers参数 url地址: 参数 url = ' https://api-tinyvideo-web.yy.com/home/tinyvideos? ' headers = { ' user-agent ' : ' Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36 ' , } param = { ' data ' : ' {"uid":0,"page":1,"pageSize":10} ' , } 发送请求 --

How to make PyCharm Python console work with code?

断了今生、忘了曾经 提交于 2020-05-09 08:21:49
问题 I am new to PyCharm (coming from IDLE) and still trying to understand how it works. I'm running PyCharm Professional 2019.3.1 on MacOS Mojave. What I'm asking is that when I run a code in PyCharm, the variables and data aren't stored in the Python console - it remains completely blank and I have to separately write in the console. For instance, in IDLE: When I write x = 2 in my program and execute it, I can browse and manipulate the value of x in IDLE's console (by entering > x = 3 , > x = 0

vs code python 关于无法找到文件路径的问题 No such file or directory

女生的网名这么多〃 提交于 2020-05-08 20:34:03
之前习惯用pycharm来开发python程序,但是pycharm打开的速度实在是太感人了,所以想转用vscode编辑器来写python,毕竟python作为一个脚本语言,用编辑器写也不会有太大的问题。 但是在vscode下写python程序的时候以为发现一个问题,在pycharm下能正常使用的程序,在vscode下就无法正常使用了,其中的一个问题就是会出现 FileNotFoundError: [Errno 2] No such file or directory: 'xxx.xxx' 首先我的文件路径是这样的。 文件路径.png 现在test2.py里面有这行代码,也是这行代码报错。 file = open ( 'data_baidu.txt' , 'r' , encoding = 'utf-8' ) 找了一下原因,发现如果直接在split_test文件目录下用命令行运行python test2.py不会有问题,但是在其他目录下运行就会报上面的FileNotFoundError的错误。 用命令行运行代码 这样一来,谜题解决了,pycharm运行python程序的时候是在相应的文件目录下运行的,而vscode是在相应的工程目录下运行的。可以看看vscode里面的launch.json的配置,这里的${file}的意思是vscode所打开的文件夹的路径。 Paste_Image