skip to Main Content

I’m running a python programm on Pycharm and I have this error :

C:UsersHPAnaconda3python.exe C:/Users/HP/PycharmProjects/3_redis/twitter_filter.py
Traceback (most recent call last):
  File "C:/Users/HP/PycharmProjects/3_redis/twitter_filter.py", line 4, in <module>
    from tweet_store import TweetStore
  File "C:UsersHPPycharmProjects3_redistweet_store.py", line 2, in <module>
    import redis
ModuleNotFoundError: No module named 'redis'

I put the screenshot of a Pycharm Windows setting, you can see project interpreter and redis package.
Pycharm Windows setting

On my tweepy_store.py programm when I write import redis, I don’t see the redis package.

When I run a twitter_filter programm I have the error of course as you can see on this screeshot.
Running error

Can you help me to solve this problem?

Thank you.

3

Answers


  1. This might be solve your problem:

    • Activate your environment: conda activate SentimentAnalysis

    • Install redis package: conda install -c anaconda redis-py

    Login or Signup to reply.
  2. Install the package redis, after activating environment.

    # Windows:
    envScriptsactivate.bat
    
    # On Unix or MacOS, run:
    source env/bin/activate
    

    Then install redis python package.

    pip install redis 
    
    Login or Signup to reply.
  3. If you conda do not find redis module. You can try download and import module manuelly and again. You can find an example: https://www.youtube.com/watch?v=Z_Kxg-EYvxM

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search