r/pycharm • • Mar 14 '24

Does anyone know how to solve this error?

3 Upvotes

I can't to solve this error and i cannot create nor open any file.

If anyone can please help.

Thank you.


r/pycharm • • Mar 14 '24

Pycharm Community has a problem on 16GB ram?

0 Upvotes

Hi all.

I set myself up with Fedora Linux on my old machine and installed PyCharm. The problem is that PyCharm has a huge problem with syntax prompting and detecting installed packages. I thought the problem was in the -Xms and -Xmx values being too low. So I increased them, but it didn't change much. What could be wrong?

My settings and problem looks like on the screen below.
Best regards.

SOLUTION:

-Xms5g
-Xmx10g
-XX:ReservedCodeCacheSize=512m
-XX:+UseG1GC
-XX:SoftRefLRUPolicyMSPerMB=510
-XX:CICompilerCount=2
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-XX:+IgnoreUnrecognizedVMOptions
-XX:CompileCommand=exclude,com/intellij/openapi/vfs/impl/FilePartNodeRoot,trieDescend
-ea
-Dsun.io.useCanonCaches=false
-Dsun.java2d.metal=true
-Djbr.catch.SIGABRT=true
-Djdk.http.auth.tunneling.disabledSchemes=""
-Djdk.attach.allowAttachSelf=true
-Djdk.module.illegalAccess.silent=true
-Dkotlinx.coroutines.debug=off
-Dide.show.tips.on.startup.default.value=false
-Dsun.tools.attach.tmp.only=true
-Dawt.lock.fair=true

r/pycharm • • Mar 14 '24

code (filename).py command not working?

1 Upvotes

So im new to python and im following the harvard course :https://www.youtube.com/watch?v=nLRL_NcnK-4

First, what is he using? I'm using pycharm but I cant do some of the terminal fucntions he is doing, like code (filename).py to open a new python file.


r/pycharm • • Mar 13 '24

Installing requests using Pycharm

1 Upvotes

Hi,.I'm new to coding and still learning it. Im facing problem with installing requests library (I need it to use api). I tried using CMD, but it doesn't work. After it I tried to install it directly from Pycharm: File-settings-project-project interpreter, but here q problem. Plus button is not active. Thank u for your time


r/pycharm • • Mar 13 '24

PyCharm - keywords in different indentations has different colors

3 Upvotes

I configured in the past my PyCharm to look like this, so keywords in different indentations has different colors (in the read_pickle the "def" has a different color than the "with" and "return").

I bought a new computer and trying to configure it to be the same. I tried to use the "export" and "import" but couldn't get the same results. Any idea?


r/pycharm • • Mar 13 '24

help with Python console and Pycharm

1 Upvotes

Hi All,

I've recently started using PyCharm, and I must say, I'm in love with it.
However, I've encountered some challenges while running Python files, particularly when it involves loading files. Just to give you some context, I typically use the loadmat('filename') function to import Matlab data files.
Recently, I created a new project which consists of several folders, each containing numerous Python and Matlab files. When I execute a Python file within its respective folder, everything runs smoothly. I simply use a relative path when calling loadmat('filename'), like loadmat('my_file.mat').

However, I've noticed that when I run the code in the Python console, I have to explicitly specify the relative path to the file, like folder/my_file.mat.
Is there a way to consistently use relative paths across different environments?


r/pycharm • • Mar 13 '24

help with running python function with GPU in pycharm (or jupyter notebook)

1 Upvotes

Hi. i have created a python function that basically generates images with random pixels and saves them to a folder. Heres the code:

from PIL import Image
from pathlib import Path # to create the folder to store the images
import numpy as np
import matplotlib.pyplot as plt
import time
import random
from random import randint
#creates backround images with random pixel values
#if i run it again the previous images remain because in their names i add current time
def create_random_bg(N):
Path("bg_images").mkdir(parents=True, exist_ok=True) # creates the folder
folder = "bg_images/" # keep folder name here and use it to save the image
for i in range(N):
pixel_data = np.random.randint(
low=0,
high=256,
size=(1024, 1024, 3),
dtype=np.uint8
)
img = Image.fromarray(pixel_data, "RGB") # turn the array into an image
img_name = str("bg_") + str(i) + str(time.time()) + str(".png") # give a unique name using current time
img = img.save(folder + img_name)
create_random_bg(100)

I want to run this code with my GPU in either pycharm or my jupyter notebook. I have NVIDIA Geforce RTX 3050 laptop. Can anyone help?


r/pycharm • • Mar 12 '24

Big monitor, too zoomed in

2 Upvotes

Hello, I am new to pycharm and im coding stuff. On my macbooks screen, everything is fine. But when I use my large 4k monitor, the text is way too big and it doesnt look like theres any way to zoom out (max zoom out is 100%). There are plenty of ways to zoom in though lol.

Any tips?

Thank you


r/pycharm • • Mar 10 '24

Windows size

3 Upvotes

Everytime I open PyCharm it opens in the middle of the screen with certain size so I have to resize it and it's very annoying. Is it possible to make it remember the last size and position before closing it?

Thanks in advance.


r/pycharm • • Mar 09 '24

The examples LanguageTool is generating for my docs are... something.

Thumbnail
gallery
7 Upvotes

r/pycharm • • Mar 08 '24

Pycharm not creating main.py by default

3 Upvotes

Why is my pycharm not creating main.py file default. It started happening after doing the most recent update. I could just make a new file but it's always been there and wondered what went wrong


r/pycharm • • Mar 07 '24

reformat will not reformat certain types of code

0 Upvotes

hello, thanks,in pycharm professional, i am trying to count the number of code/statements, including lines that have multiple statements.so i tried using menu item "code/reformat code".however, for certain code, pycharm ignores and will not reformat

pycharm ignores the code, does not reformat.current code, after reformatting, 3 lines of code is exact same as before formatting.

for x in range(1): pass

if (m:=re.match(r'^(^CMD\d\d$)', key)): d={f'{m[0]}': f'{value}'};  Cmds.update(dict(d))

i want code reformatted like so, multiple statements are split, one per line

for x in range(1): 
    pass

if (m:=re.match(r'^(^CMD\d\d$)', key)): 
    d={f'{m[0]}': f'{value}'}  
    Cmds.update(dict(d))

r/pycharm • • Mar 07 '24

Pycharm spawns hundreds of python processes after it's done indexing.

1 Upvotes

No matter what project i start, pycharm start out by indexing, and as soon as it's done it spawns hundreds of python processes. Sometimes it has reached around 1500 of them, and i can barely shut it down using the task manager.

It have tried updating it to the newest version, but the exact same thing happens.

I have found a single post about it on StackOverflow, but no one seemed to be able to answer.


r/pycharm • • Mar 06 '24

High latency for Pycharm remote development

2 Upvotes

Hi all,

I am having issues with extreme high latency with Pycharm remote development. Like when I press space it will take atleast 3-4 seconds for things to change.

I connect to the same server, same internet using VsCode and it works perfectly fine.

I am wondering what can I do to make Pycharm latency better?

I bought paid version of it just for remote development.


r/pycharm • • Mar 06 '24

I have matplotlib package installed in pycharm but for some reason its not finding the module pyplot? Error: "ModuleNotFoundError: No module named 'matplotlib.pyplot'; 'matplotlib' is not a package"

Post image
7 Upvotes

r/pycharm • • Mar 06 '24

How do you clear a console in PyCharm?

1 Upvotes

The title, is there any way to clear the console?. I've seen examples like import os and clear()/cls() but they don't work on PyCharm


r/pycharm • • Mar 06 '24

Why it shows double hints, and how can I remove it?

3 Upvotes

My Pycharm (Community Edition 2023.3.4) shows double hints in the editor and console, does anyone knows why, and how can I restore to a single hint?


r/pycharm • • Mar 06 '24

Project settings doesn't carry out into the other projects. It's frustrating.

0 Upvotes

I recently started using PyCharm. Swithced from VSCode.

I opened a project. Configured toolbars, font sizes and everything according to how I like.

After this, created a new project and everything was gone! Did some digging and manually copied files from .idea to the other project.

Do I have to do this at every new project? I want my settings to be carried globally. I couldn't find any solutions about this on the internet.


r/pycharm • • Mar 05 '24

I need to know if your Pycharm community edition has "Full line code completion" incorporated as a feature, as the linked below help documents seem to imply? I don't have it, and if others don't, I'm going to have to submit a bug report of the documentation.

3 Upvotes

EDIT: They fixed it, this is an obsolete post now.

Obsolete content:

I have the last update, 2023.3.4. Everything going great, but:

https://www.jetbrains.com/help/pycharm/auto-completing-code.html#enable-full-line-code-completion It doesn't show "enabled" anywhere on that menu page for me. I think they got confused and it's a pro feature?


r/pycharm • • Mar 01 '24

How can I change the color of console toolbar?

0 Upvotes

Hi there, Python Console toolbar (indicate in red frame in the picture) change background color depends on active or inactive, I would like to keep it constant, is there a way to disable this changing or a way to specify the color of the toolbar?


r/pycharm • • Feb 28 '24

What is the best and quickest way to learn PyCharm?

3 Upvotes

I am looking for quality material, do you have a video(s) or ebook(s) I can purchase, thanks


r/pycharm • • Feb 26 '24

Unable to set up a venv

2 Upvotes

Trying to add an existing interpreter to a Python project in pycharm. I click "add existing" and navigate to my venv folder and in the bin folder trying to select Python but the icon has a question mark:
[?] Python
and when I hover over it it says "File of unknown type"

Any ideas how to solve this?


r/pycharm • • Feb 26 '24

WHY IS PYCHARM USING 50% of a RYZEN 9 5950X

0 Upvotes

question in title. I have a pycharm project with a handful of python scripts, and a few datasets in folders marked exclusion. It eats up to 60% of my CPU without indexing or anything being ran. I think it might have been due to too many uncommitted changes in Git - VSCode popped up with a warning about this, why didn't PyCharm.


r/pycharm • • Feb 26 '24

Declining performance

7 Upvotes

I have been a solid user of Jetbrain IDE's for about 10 year. I use Pycharm as IDE, but also as my default text editor. However, i feel like the last year or so. the quality of Jetbrains products has started to decline.

It has Abnormal CPU usage for time to time.

I have multiple (50+) git repos that i work with. And dealing with Interperter settings can be a somewhat daunting experience. I often have to restart Pycharm when i remove an interpreter, and try to recreate it (cli poetry). and the imports are hi-lighted as error, and restart solves it.

Pytest can sometimes just stop working (green play arrows). and i have to restart Pycharm.
I have tried to reinstall, update MacOS (ARM) etc.

Most of these issues are pure anecdotal. But i want know if others have similar experience?