pycharm

django error cannot import name 'RemovedInDjango30Warning'

血红的双手。 提交于 2020-06-14 05:04:48
问题 Guys im fairly new to Django and I just started working on a personal project and decided that ill-use pycharm (i think its related to the error, or not). when I run python manage.py runserver I get the error posted below. I did a bit of googling and looks like its caused by inconsistency with Django versions. I currently have Django 3.0 and I checked both globally and in the venv. I tried to start a project outside of py charm and im running into the same issue. idk what I need to do to

How do I configure Python and organise my interpreters?

岁酱吖の 提交于 2020-06-13 09:32:11
问题 Background: I have been learning Python (on MacOS) for about three months now, so please go easy on me. I began by installing Python 3.7 through Anaconda and predominantly used Jupyter Notebook to write code. As I learnt more, I found out about different text editors and IDEs, and tried out different programs: IDLE, Sublime and PyCharm. As I progressed I also learned about package management systems, such as pip and conda, and other such wonderful things that helped me achieve the things I

Type-hinting for the __init__ function from class meta information in Python

落爺英雄遲暮 提交于 2020-06-12 06:49:17
问题 What I'd like to do is replicate what SQLAlchemy does, with its DeclarativeMeta class. With this code, from sqlalchemy import Column, Integer, String from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class Person(Base): __tablename__ = 'person' id = Column(Integer, primary_key=True) name = Column(String) age = Column(Integer) When you go to create a person in PyCharm , Person(... , you get typing hints about id: int, name: str, age: int , How it works at

How to call an ncurses based application using subprocess module in PyCharm IDE?

只愿长相守 提交于 2020-06-12 04:58:05
问题 I would like to launch an ncurses based application from python using subprocess module. The ncurses based application is TABARI, an event extraction system. The result of event extraction is saved to a file. I would like to launch it from a python script, wait for it to terminate and then read the results file. A code sample is shown bellow: import subprocess proc = subprocess.Popen('TABARI -a ' + file, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) print proc.communicate() The

Descriptive flake8 errors in PyCharm

我是研究僧i 提交于 2020-06-09 17:06:30
问题 PyCharm does not have a built-in support for flake8 at the moment. But, flake8 can be configured to run as an external tool. Sometimes, especially for Python newcomers, not every flake8 warning is understandable and additional clarification is required. We've recently stumbled upon the Flake8Rules project which attempts to describe every single warning in a detailed way with supportive examples. Is there a way to combine PyCharm, flake8 and Flake8Rules altogether to have static code analysis

How can I force PyCharm to inspect the requirements.txt file and suggest updates?

血红的双手。 提交于 2020-06-09 15:56:56
问题 How can I force PyCharm to inspect the requirements.txt file and suggest updates? I can't seem to control when this happens. Thanks! 回答1: Open any .py file after requirements.txt has been changed, PyCharm will parse requirements.txt and suggest updates, e.g. packages installation. 回答2: I tried opening any .py file, checking Package requirements file field (Settings - Tools - Python Integrated Tools). Nothing triggered my PyCharm on Windows to detect a new dependency added to requirements.txt

I can't import xml.dom.minidom in PyCharm. What could I Try?

你离开我真会死。 提交于 2020-06-08 19:17:37
问题 I'm trying to import xml.dom.minidom but pycharm doesn't find it, altough it finds xml.entree / xml.parser / xml.sax. The rest of the standart libraries work all fine. The xml file (beispiel.xml) shouldn't be the problem, because it hasn't "xml" in the name. from xml.dom import minidom document = minidom.parse("beispiel.xml") wanted_info = input("Which prduct do you want to see?") product_list = document.getElementsByTagName(wanted_info) for product in product_list: for value in product

I can't import xml.dom.minidom in PyCharm. What could I Try?

♀尐吖头ヾ 提交于 2020-06-08 19:17:08
问题 I'm trying to import xml.dom.minidom but pycharm doesn't find it, altough it finds xml.entree / xml.parser / xml.sax. The rest of the standart libraries work all fine. The xml file (beispiel.xml) shouldn't be the problem, because it hasn't "xml" in the name. from xml.dom import minidom document = minidom.parse("beispiel.xml") wanted_info = input("Which prduct do you want to see?") product_list = document.getElementsByTagName(wanted_info) for product in product_list: for value in product

Tkinter configuration

Deadly 提交于 2020-06-01 04:48:25
问题 I'm super new to programming and I'm using pycharm as my IDE. import _tkinter # If this fails your Python may not be configured for Tk ModuleNotFoundError: No module named '_tkinter' Not sure why I get this error, I installed the Tk library as well and still get the error. I am using a Mac. 回答1: If you are using python3 please use import tkinter 回答2: Well,if you are using python 3.8,In the install Setup,it has this choice: If this couldn't solve your problem,Read the python official document

Cannot install googleapiclient on PyCharm

给你一囗甜甜゛ 提交于 2020-06-01 04:10:53
问题 I have recently installed PyCharm on my Raspberry Pi 3 b+ (Running version 9 [Stretch]) and I am having some trouble installing the googleapiclient package on PyCharm and the system. When I perform a pip/pip3 install for this package I receive an error stating: ERROR: Could not find a version that satisfies the requirement googleapiclient (from versions: none) ERROR: No matching distribution found for googleapiclient This is the same error message that I receive on PyCharm when it tries to do