pycharm

checking the Colors Opencv Python

会有一股神秘感。 提交于 2020-01-06 19:27:56
问题 I have a code to detect two colors green and blue. I want to check if green color is detected to print a massage and if blue color is detected to print another message too Here is the Code: import cv2 import numpy as np cap = cv2.VideoCapture(0) while(1): # Take each frame _, frame = cap.read() # Convert BGR to HSV hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV) # define range of blue color in HSV lower_blue = np.array([110,50,50]) upper_blue = np.array([130,255,255]) lower_green = np.array([50,

adding --trusted-host to pycharm package installer

∥☆過路亽.° 提交于 2020-01-06 14:16:23
问题 I am trying to add --trusted-host to Pycharm (2018.2.5 community editions) package installer. However it does not work. for exampl: python -m pip install scipy --trusted-host pypi.org I even tried to add "--trusted-host pypi.org " in the option. Still doesn't work. 回答1: In your output it shows that you are only supplying --trusted-host as the option and, the way PyCharm has built the command, it has tried to execute pip install --trusted-host scipy hence the error "You must give at least one

force refresh of external libraries not working

谁说我不能喝 提交于 2020-01-06 09:06:16
问题 I have python project within a virtualenv. I opened it in pycharm. Later i have installed some packages using pip from inside the virtualenv but not from pycharm rather from the commandline directly. But in pycharm > settings > python interpreter : it does not show the package which i just installed from outside pycharm. I tried to select another interpreter and come back, still its not showing the package installed from outside pycharm. I have restarted pycharm still no luck. Any idea how to

Stop x-axis labels from shrinking the plot in Matplotlib?

南笙酒味 提交于 2020-01-06 07:59:46
问题 I'm trying to make a bar graph with the following code: import pandas as pd import matplotlib.pyplot as plt import seaborn as sns test = {'names':['a','b','abcdefghijklmnopqrstuvwxyz123456789012345678901234567890'], 'values':[1,2,3]} df = pd.DataFrame(test) plt.rcParams['figure.autolayout'] = False ax = sns.barplot(x='names', y='values', data=df) ax.set_xticklabels(ax.get_xticklabels(), rotation=90) plt.show() But I get the following error because the long value in 'names' as a label on the x

pip install vprof fails

别说谁变了你拦得住时间么 提交于 2020-01-06 06:50:11
问题 I'm trying to install the package vprof from PyCharm but I'm getting the error: Collecting vprof Using cached https://files.pythonhosted.org/packages/0b/2b/5b690c8bd73231216c82180b7b162cf433dd98d6212b19a7374c5cf09622/vprof-0.36.1.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "C:\Users\xxx\AppData\Local\Temp\pycharm-packaging\vprof\setup.py", line 12, in from pip.download import PipSession ImportError: No module named

PyCharm won't find pytz

你离开我真会死。 提交于 2020-01-06 05:06:07
问题 While I'm SURE pytz is installed in my virtualenv, as well as I'm SURE that my PyCharm's project is using the said virtualenv, the IDE is constantly complaining: And when I check in the virtualenv: (my-project-venv)anto@~/d/m/myproject$ pip freeze | grep pytz pytz==2014.4 (my-project-venv)anto@~/d/m/myproject$ python -c "import pytz; print pytz" <module 'pytz' from '/home/anto/.virtualenvs/my-project-venv/local/lib/python2.7/site-packages/pytz/__init__.pyc'> What am I missing? 回答1: This is

Pycharm site-packages folder marked red and modules cannot be imported

懵懂的女人 提交于 2020-01-06 04:44:05
问题 I have installed some files ( pygame , python-docx ) through pip . They appear in pycharm in the site-packages folder, but I cannot import anything from that folder. I get a ModuleNotFoundError . The site-packages folder and sub-folders all appear as red. Any ideas what I should do? I have python 3.7 and pycharm community edition 2018.2.3 回答1: Try to check if your current project interpreter is correct: you should see the path to your python environment where all packages are installed as

Failing to load packages with pycharm

有些话、适合烂在心里 提交于 2020-01-05 07:34:07
问题 I am trying to do some web scrapping using python with PyCharm on a windows 10 machine. Some sites suggest using lxml library and it sounds good. I am trying to load the package but am having trouble. What should I do? OK great. I go to add lxml 3.6.4 in the package installer and it fails with the message(s): ERROR: b"'xslt-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n" and Could not find function xmlCheckVersion in library libxml2. Is

Jupyter notebooks in pycharm do not have Local History support in Pycharm?

落花浮王杯 提交于 2020-01-05 06:45:15
问题 Local History is an absolutely fundamental/crucial feature of Jetbrains IDE families - including Pycharm . Why would it be missing for the .ipynb files? Here is the right click/context menu - in which the Show History is missing: In addition: the Code Editing History Navigation feature is not working in the notebooks: notice that the Last Edit Location option is disabled even though I had edited this notebook: Why are basic/core code editing features missing for these notebooks? Is there a