You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Anaconda环境时PyCharm调试报错求助

Fixing PyCharm Debugger Error 0xC0000005 with Anaconda TensorFlow Environment

Hey Barak, sorry to hear you're stuck with this debugging error—exit code -1073741819 (0xC0000005) is a memory access violation, which usually stems from compatibility issues between PyCharm's debugger, your Anaconda environment, or system settings. Let's go through actionable fixes to get your debugger working:

1. Upgrade PyCharm to the Latest Version

Your current PyCharm version (2018.1.2) is quite outdated. Newer versions include an updated pydevd (the underlying debugger tool) that’s far more compatible with modern Anaconda and TensorFlow environments. Head to JetBrains’ official site to download the latest Community Edition, install it, and reconfigure your tfenv environment in the new setup.

2. Reinstall/Update Pydevd in Your Anaconda Environment

Mismatched versions of the pydevd package between PyCharm’s built-in tools and your environment can trigger conflicts. Run these commands in your Anaconda prompt (after activating tfenv):

conda activate tfenv
pip install --upgrade pydevd
# If pip fails, try conda instead
conda install -c conda-forge pydevd

3. Adjust PyCharm Debugger Compatibility Settings

Tweak these settings to resolve process attachment or compatibility glitches:

  • Open File > Settings > Build, Execution, Deployment > Debugger > Python Debugger
  • Toggle the Gevent compatible checkbox (enable if disabled, disable if enabled)
  • Uncheck Attach to subprocess automatically—even empty scripts might trigger subprocess checks that cause this error
  • Click Apply and restart PyCharm before testing the debugger again

4. Verify Python-TensorFlow Version Compatibility

Make sure your environment’s Python and TensorFlow versions are fully compatible. For example:

  • TensorFlow 2.10+ supports Python 3.7–3.10
  • Older TensorFlow versions have stricter Python version limits

Check your versions with these commands in your activated environment:

python --version
pip show tensorflow

If versions are mismatched, recreate your Anaconda environment with a compatible Python version and reinstall TensorFlow.

5. Exclude PyCharm/Anaconda Directories from Antivirus

Windows Defender or third-party antivirus tools often flag pydevd.py (the debugger process) as suspicious, blocking its memory access. Try:

  • Temporarily disabling real-time protection
  • If debugging works after disabling, add these directories to your antivirus whitelist:
    • Your PyCharm installation folder (C:\Program Files\JetBrains\PyCharm Community Edition...)
    • Your Anaconda environment folder (C:\Users\Barak\Anaconda3\envs\tfenv)

6. Reset PyCharm Debugger Configuration

Corrupted debugger config files can cause unexpected errors:

  • Close PyCharm completely
  • Navigate to your PyCharm config directory (for 2018.1.2, it’s C:\Users\Barak\.PyCharmCE2018.1)
  • Delete the config\options\debugger.xml file
  • Restart PyCharm—it will regenerate a fresh debugger configuration

Start with upgrading PyCharm first, as outdated versions are the most common culprit for this specific error. If that doesn’t resolve it, work through the other steps one by one.

内容的提问来源于stack exchange,提问作者BarakB

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 07:11:23