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

Pip安装成功但导入报ModuleNotFoundError:Anaconda与PyCharm冲突

Troubleshooting Tweepy Import Failure in PyCharm (Anaconda Python 3.6.3)

Hey there! Let's work through why you're hitting an import error for Tweepy in PyCharm even though you've successfully installed it via pip. Here are the most common fixes to try:

  • Verify PyCharm is using your Anaconda Python interpreter
    Since you installed Tweepy into your Anaconda environment, PyCharm might be pointing to a different Python version by default. To check:

    1. Go to File > Settings > Project: [Your Project Name] > Python Interpreter
    2. Look at the interpreter listed at the top—does it point to C:\Users\Student\Anaconda3\python.exe?
    3. If not, click the gear icon > Add > Existing environment, navigate to that Anaconda Python executable, select it, and save your changes.
  • Install a Tweepy version compatible with Python 3.6
    Python 3.6 is quite old, and newer Tweepy releases no longer support it. Try installing a version that works with 3.6:
    Open your Anaconda terminal (or the command prompt linked to your Anaconda Python) and run:

    pip install tweepy==3.10.0
    

    This version is confirmed to work with Python 3.6. After installation, go back to PyCharm and refresh the interpreter dependencies.

  • Refresh PyCharm's package index
    Sometimes PyCharm doesn't immediately detect newly installed packages. On the Python Interpreter settings page, click the circular refresh icon in the top-right corner. Wait for the index to update, then try importing Tweepy again.

  • Check for project-specific virtual environments
    If your PyCharm project is using a virtual environment, the Tweepy you installed globally (in Anaconda) won't be available here. You have two options:

    1. Switch your project interpreter to the global Anaconda one (follow the first step above)
    2. Activate your project's virtual environment in PyCharm's built-in Terminal, then run pip install tweepy==3.10.0 to install it locally.

Give these steps a try—one of them should get your Tweepy import working in PyCharm!

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.19 09:17:39