pycharm

PyCharm debugger console ANSI escape sequences

南笙酒味 提交于 2021-01-28 12:00:02
问题 PyChar 3.4.1 debugger console appears to support some ANSI escape sequences but not all. Is there a way to find out what is or isn't supported? I noticed that setting a text color like red '\033[31m' works but not the reset/normal/endc '\033[0m' code. I could set it to black but then I can't see the text on my black terminal window when I run the program from bash. Also, I noted that stdin under the debugger returns False for sys.stdin.isatty() 回答1: You can find the code used by PyCharm for

Is it possible to “hint” dictionary keys?

时光毁灭记忆、已成空白 提交于 2021-01-28 11:47:43
问题 In PyCharm Code completion > "Basic Completion" > "Invoke Basic Completion" > "Dictionaries" I see that, if you hard-code a dictionary to some values, you can use code completion when writing code about that dictionary. But obviously, in many cases, you will work with a dict and you have some idea in advance what the structure of that dict will be, and you don't want to hard-code the dict into your code. For example, maybe you're parsing some YAML or JSON that has an expected structure. It

Python - TypeError: listen() missing 1 required positional argument: 'self'

ⅰ亾dé卋堺 提交于 2021-01-28 11:42:10
问题 I have been working on an AI in PyCharm but and I have seem to have encountered an error with speech_recognition trying to call a method to try to get audio input: /Users/waynedeng/Desktop/AI/venv/bin/python /Users/waynedeng/Desktop/AI/dawg_2.0.py Listening... Traceback (most recent call last): File "/Users/waynedeng/Desktop/AI/dawg_2.0.py", line 37, in <module> input = read_input() File "/Users/waynedeng/Desktop/AI/dawg_2.0.py", line 20, in read_input audio = speech.listen(source=source,

How to install numpy with PyCharm on mac OSX?

元气小坏坏 提交于 2021-01-28 10:10:59
问题 I downloaded the binary file and all it does is open up PyCharm. How can I install? Many thanks. 回答1: I ran into the same problem. And I solved it like this: File/Default Settings... Chose Default Project/Project Interpreter Chose the version of Python you are working with from the popup menu Project Interpreter. Below the list click on the '+' button. Find your way in the huge list of Packages available to find 'numpy' and install it. There is probably another way to make it per project, but

Error on loading OpenCV EAST text detector in Python

断了今生、忘了曾经 提交于 2021-01-28 09:20:22
问题 I'm trying to use EAST text detector to detect areas of text in images, but am having trouble on loading the pre-trained EAST text detector. The following is my text_detection.py file from imutils.object_detection import non_max_suppression import numpy as np import argparse import time import cv2 import requests import urllib # construct the argument parser and parse the arguments ap = argparse.ArgumentParser() ap.add_argument("-i", "--image", type=str,help="path to input image") ap.add

Can't import tensorflow in PyCharm

白昼怎懂夜的黑 提交于 2021-01-28 09:00:28
问题 I'm trying to import tensorflow in PyCharm, however I get an error that the module is not found. I used pip install to install tensorflow. Also when I look at the interpreter in PyCharm it says I have pip version 9.0.1 and the latest is 10.0.1. I have upgraded to 10.0.1 using the pip commands, and when I run pip --version it says I got 10.0.1. I have tried both reinstalling pycharm and making new projects with no luck. 回答1: Go to Files -> Settings -> Project:projectname -> Project Interpreter

Can't import tensorflow in PyCharm

陌路散爱 提交于 2021-01-28 08:42:16
问题 I'm trying to import tensorflow in PyCharm, however I get an error that the module is not found. I used pip install to install tensorflow. Also when I look at the interpreter in PyCharm it says I have pip version 9.0.1 and the latest is 10.0.1. I have upgraded to 10.0.1 using the pip commands, and when I run pip --version it says I got 10.0.1. I have tried both reinstalling pycharm and making new projects with no luck. 回答1: Go to Files -> Settings -> Project:projectname -> Project Interpreter

Pycharm can't find the Interpreter

孤者浪人 提交于 2021-01-28 04:03:50
问题 I downloaded the student version of Pycharm from https://www.jetbrains.com/de-de/community/education/#students. We use Anaconda and Open CV as a package manager and basic library. I have a problem with the interpreter. I open a new project and select "Pure Python" and under the bar "new environment using Virtualenv". The paths for location and base interpreter were already entered: When I next click on "Create" an error message appears, which says "Python was not found but can be installed

Run PyCharm project outside of PyCharm

白昼怎懂夜的黑 提交于 2021-01-28 03:09:29
问题 I have a PyCharm project which uses a virtual env and its own site-packages and I want to be able to run it without needing to open PyCharm everytime. My current naive solution is runing a batch file which launches the python in the venv and the main script python.exe ../../PythonFiles/Main.pyw . The issue with this is that the console will stay open as its running from a batch process. 回答1: You can activate your virtual python environment by this command source activate yourenvname then

DataError: (1406, “Data too long for column 'name' at row 1”)

杀马特。学长 韩版系。学妹 提交于 2021-01-28 02:26:44
问题 I've read nearly all other posts with the same error and can't seem to find a proper solution. In my models.py file I have this: class LetsSayCups(models.Model): name = models.CharField(max_length=65535) def __str__(self): return str(self.name) I get this error when I try to load aws mysql data into my local mysql server. I had the issue occur for another part in my models.py file, and the way I was able to work around it was by going into the my.cnf.bak file and changing the sql_mode from: