pycharm

Imports not found when running script outside of Pycharm?

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-09 08:36:35
问题 I have a project structured this way... main.py imports scripts from subfolders like so: from controllers.available_balances_controller import available_balances_controller Subfolders: models views controllers When running main.py in Pycharm it works find. When I try to run in terminal I get import errors: Traceback (most recent call last): File "main.py", line 6, in <module> from controllers.available_balances_controller import available_balances_controller ImportError: No module named

can't seem to fix PyCharm warnings in a simple PyQt program

六月ゝ 毕业季﹏ 提交于 2021-02-08 15:06:39
问题 The following program (an extract of my real code) from PyQt4 import QtGui import sys from PyQt4.QtGui import QMessageBox def main(): app = QtGui.QApplication([]) w = QtGui.QPushButton("Test") def on_pressed(): print("Pressed") QMessageBox.warning(w, 'Info', 'Button Pressed') w.pressed.connect(on_pressed) w.show() sys.exit(app.exec_()) if __name__ == '__main__': main() triggers the following three warnings in PyCharm (eg when running Code/Inspect Code... ) related to the QMessageBox.warning

Python Selenium Traceback (most recent call last):

帅比萌擦擦* 提交于 2021-02-08 12:01:32
问题 I'm trying to use selenium for a python web scrapper but when I try to run the program I get the following error: "/Applications/Python 3.8/IDLE.app/Contents/MacOS/Python" "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 52548 --file /Users/xxxx/git/python/python_crawler_example_01/naver_crawling.py pydev debugger: process 3004 is connecting Connected to pydev debugger (build 192.7142.56) Traceback (most recent call last):

Python Selenium Traceback (most recent call last):

旧巷老猫 提交于 2021-02-08 12:01:29
问题 I'm trying to use selenium for a python web scrapper but when I try to run the program I get the following error: "/Applications/Python 3.8/IDLE.app/Contents/MacOS/Python" "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 52548 --file /Users/xxxx/git/python/python_crawler_example_01/naver_crawling.py pydev debugger: process 3004 is connecting Connected to pydev debugger (build 192.7142.56) Traceback (most recent call last):

从零开始学Pytorch(零)之安装Pytorch

时光毁灭记忆、已成空白 提交于 2021-02-08 08:47:09
点击上方“ 计算机视觉cv ”即可“进入公众号” 重磅干货第一时间送达 Pytorch优势   聊聊为什么使用Pytorch,个人觉得Pytorch比Tensorflow对新手更为友善,而且现在Pytorch在学术界使用的得更多,大有逆袭Tensorflow之势。最近两年的顶会文章中,代码用Pytorch的比Tensorflow多。大家如果对Tensorflow也感兴趣,完全可以学习了Pytorch之后继续学习Tensorflow,基本原理都是相通的。让我们开始开启愉快的Pytorch学习之旅吧! 在Ubuntu系统或是windows系统安装Pytorch   首先打开Pytorch的官网:https://pytorch.org/。在首页我们可以看到有各种配置可选,我们这里选择CPU或是GPU的版本都可以。一般选择GPU版本的Pytorch,这样运行大型的程序速度会快很多。而要运行GPU的Pytorch,就需要在电脑(不管是Ubuntu系统还是windows系统)安装相应的CUDA9和cudnn7,这两个安装起来有时候会遇到一大堆问题,所以需要一步一步解决。推荐一个我写的在Ubuntu系统安装教程的博客,按照博客上写的一步步来就可以啦。 博客链接:https://blog.csdn.net/xiewenrui1996/article/details/102736238 。  

Pycharm Run/Debug Configuration saved as default

旧时模样 提交于 2021-02-08 07:25:19
问题 Simple question but couldn't find a clear answer anywhere. Do i have to create a new run/debug configuration every time i create a new project, and assign the .py file at "script" or is there a way to make pycharm do this automatically. Would love to know! Thanks in advance :) 回答1: You need to create new run/debug configuration in every new project based on pre-defined templates. However you can edit a template so that some of the values will be set by default . Here is the information on how

Pycharm Run/Debug Configuration saved as default

风格不统一 提交于 2021-02-08 07:25:00
问题 Simple question but couldn't find a clear answer anywhere. Do i have to create a new run/debug configuration every time i create a new project, and assign the .py file at "script" or is there a way to make pycharm do this automatically. Would love to know! Thanks in advance :) 回答1: You need to create new run/debug configuration in every new project based on pre-defined templates. However you can edit a template so that some of the values will be set by default . Here is the information on how

Offline documentation for specific version of pycharm

℡╲_俬逩灬. 提交于 2021-02-08 06:34:24
问题 Often I need to work offline for my python projects. How can I download PyCharm documentation for offline use? 回答1: There's an option in PyCharm: go "Settings/Tools/Python External Documentation"; BUT it seems thishas not been working with local files for a long time due to a PyCharm bug. You can start a local server and pretend it to be a docs.python.org site. Get docs archive Unpack archive to folder named exactly "3.6" Edit your hosts file: C:\Windows\System32\drivers\etc\hosts or /etc

mysql-connector won't import into script in pycharm

走远了吗. 提交于 2021-02-08 04:56:33
问题 I have successfully installed mysql-connector using pip. Installing collected packages: mysql-connector Running setup.py install for mysql-connector ... done Successfully installed mysql-connector-2.1.6 However, in PyCharm when I have a script that uses the line: import mysql-connector PyCharm gives me an error saying there isn't a package called "mysql" installed. Is there some sort of syntax that should be used to indicate that the entire package name contains the "-" and is not just "mysql

pyCharm: force import lines to not get grayed out

笑着哭i 提交于 2021-02-07 18:47:29
问题 I want to make an other modules method available. from other_lib import foo_method Since foo_method is not used in this file, it grayes out this line. Is there a way to stop pyCharm from doing this? 回答1: The feature giving this kind of information is called Inspections on Intellij platforms. In this case, it seems that Optimize imports has been grouped under Unresolved references (at least in Pycharm 4 CE). You can disable this inspection once for all, yet be aware that in-code inspections of