pycharm

pycharm 调试代码

和自甴很熟 提交于 2020-01-14 16:01:07
1 给代码添加断点 点击代码前方与行数中间的空白区域,给想要调试的代码添加断点 2 运行代码 2.1 右键 找到Debug 运行代码 2.2 点击右上角进行debug 注意 : debug的文件是否一致 3 调试代码 来源: CSDN 作者: BeefpasteC 链接: https://blog.csdn.net/ybw_2569/article/details/103751166

pycharm+selenium搭建环境之no module named 'selenium'异常解决

笑着哭i 提交于 2020-01-14 13:14:33
在pycharm上搭建python+selenium自动化测试环境时,遇到一个很坑的问题:no moduel named ‘selenium’ 如下图: 解决方法: 1.查看你的python是否正确安装了selenium包,没有的话,在你的python安装目录D:\Python36\Scripts下执行pip install selenium 安装完成后最好直接打开python,在下面输入from selenium import webdriver,回车后是否报错,没报错则说明成功安装selenium包    2.python安装好后,查看你的pycharm输出控制台,第一行就写了你所使用的python.exe的路径,如下图箭头处所示: 检查python使用的是不是你刚刚安装的,如果不是,换成你刚刚安装的python.exe路径。步骤如下:   I.打开pycharm,点击Settings,找到Project Interpreter,点击右边的下拉菜单下的show All...选项,如图:        II.点击show All...选项后,点击框框中的+号,在点击System Interpeter选项,从右边的Interpreter把你安装的python路径加进去即可        III.在I步骤的project Interpeter那里选择你加入的python路径

Pycharm: Marking a folder as 'sources root' is not recursive for subfolders

断了今生、忘了曾经 提交于 2020-01-14 11:33:33
问题 I've followed pycharm documentation to set up the IDE to resolve imports. However it seems that each folder containing *.py files needs to be explicitly added as 'sources root' in order for the IDE to resolve all references. Can this be done recursively from a root folder? Is this the correct way to get the IDE to resolve all codebase references, or have I not set up my project structure correctly? I have already followed other methods for resolving references in the IDE here and here but to

Pycharm: Marking a folder as 'sources root' is not recursive for subfolders

寵の児 提交于 2020-01-14 11:32:02
问题 I've followed pycharm documentation to set up the IDE to resolve imports. However it seems that each folder containing *.py files needs to be explicitly added as 'sources root' in order for the IDE to resolve all references. Can this be done recursively from a root folder? Is this the correct way to get the IDE to resolve all codebase references, or have I not set up my project structure correctly? I have already followed other methods for resolving references in the IDE here and here but to

Openpyxl “Numbers Stored as Text”

被刻印的时光 ゝ 提交于 2020-01-14 10:38:10
问题 I've done some extensive searching on StackOverflow as well as many other sites and can't seem to find a solution that will work for me. Background: - New to Python (and coding in general) - Using Pycharm w/ Openpyxl - I work a lot in Excel and have been trying to automate some small daily tasks using python to increase my understanding of the language Situation: - I am trying to modify an existing xlsx sheet, and have been able to successfully change formatting like column width, zoom, etc.

Expected type 'Union[ndarray, Iterable]' warning in Python instruction

天大地大妈咪最大 提交于 2020-01-14 09:34:10
问题 I have translated a Matlab function to create an Overcomplete Discrete Cosine Transform matrix to represent 1D signals in such vectorial space, to Python language. Matlab Function function D = odctdict(n,L) %ODCTDICT Overcomplete DCT dictionary. % D = ODCTDICT(N,L) returns the overcomplete DCT dictionary of size NxL % for signals of length N. % % See also ODCT2DICT, ODCT3DICT, ODCTNDICT. D = zeros(n,L); D(:,1) = 1/sqrt(n); for k = 2:L v = cos((0:n-1)*pi*(k-1)/L)'; v = v-mean(v); D(:,k) = v

What is the correct way to type hint a homogenous Queue in Python3.6 (especially for PyCharm)?

大憨熊 提交于 2020-01-14 08:27:38
问题 I'm writing a fractal generator in Python 3.6, and I use multiprocessing.Queue s to pass messages from the main thread to the workers. This is what I've tried so far, but PyCharm doesn't seem to be able to infer attribute types for items taken from the queues: from typing import NamedTuple, Any, Generic, TypeVar, Tuple from multiprocessing import Process, Queue T = TypeVar() class Message(NamedTuple): method: str id: str data: Any = None class TypedQueue(Generic[T]): def get(self) -> T: ...

Linux下Pycharm的快捷方式设置(教育版和专业版)

前提是你 提交于 2020-01-14 08:00:06
Linux下Pycharm的快捷方式设置(教育版和专业版) 在安装好Pycharm之后,每次都要在终端运行./pycharm.sh可谓是非常麻烦,下面我将来讲讲Pycharm的快捷方式的建立 1:教育版的快捷方式设置 1:首先,我们在/usr/share/applications下建立一个pycharm.Desktop文件: sudo touch /usr/share/applications/pycharm.Desktop 2:利用gedit编辑快捷方式文件: sudo gedit /usr/share/applications/pycharm.Desktop 3:在其中输入以下内容,输入完成后,保存即可: [Desktop Entry] Version=1.0 Type=Application Name=PyCharm Icon=/opt/pycharm-2019.3.1/bin/pycharm.png Exec="/opt/pycharm-2019.3.1/bin/pycharm.sh" %f Comment=Python IDE for Professional Developers Categories=Development;IDE; Terminal=false StartupWMClass=jetbrains-pycharm 4:要删除该快捷方式,在终端输入:

PyCharm笔记之首次安装和激活

删除回忆录丶 提交于 2020-01-14 04:45:23
转载: http://www.cnblogs.com/Ivyli4258/p/7440147.html 转载: https://blog.csdn.net/u014044812/article/details/78727496 (2019最新版激活方式) PyCharm是一种Python IDE,带有一整套可以帮助用户在使用Python语言开发时提高其效率的工具,比如调试、语法高亮、Project管理、代码跳转、智能提示、自动完成、单元测试、版本控制。此外,该IDE提供了一些高级功能,以用于支持Django框架下的专业Web开发。 1.首先去下载最新的pycharm 2.7.3,进行安装,点击官网下载: https://www.jetbrains.com/pycharm/ 在此我们下载专业版,点击安装 2.激活 因为只有30天试用期,所以最好激活就完美了 我们选择你License server方式激活 在License server address输入:http://idea.liyang.io 激活过程中 激活成功 大功告成!!! 来源: https://www.cnblogs.com/chechen/p/7609686.html

PyCharm安装与配置,python的Hello World

久未见 提交于 2020-01-14 04:02:26
1. 访问 https://www.jetbrains.com/zh/pycharm/download/download-thanks.html, 下载pycharm 安 装包,点击安装. 2. 用记事本打开hosts文件,Windows系统hosts文件路径为:c:\windows\system32\drivers\etc,将0.0.0.0 account.jetbrains.com添加到hosts文件最后 3.打开Pycharm,进入激活界面,选择activation code,填入下面注册码 EB101IWSWD