Yax
Yax

Reputation: 2189

ImportError at /mysite/ No module named bleach

I tried to google this tirelessly and couldn't get help at all.

I just pip install bleach and when I tried using in my views.py, import bleach it says ImportError at /mysite/ No module named bleach

I installed from this directory in command prompt:

(env) C:\Python27\Lib\site-packages\env\Scripts\myproject\mysite>pip install bleach

What am I doing wrong?

Upvotes: 0

Views: 3158

Answers (1)

cdvv7788
cdvv7788

Reputation: 2089

Installing as admin screws the whole point of using virtualenv

When using virtualenv you are setting a custom place for your libraries. You can use pip install my-package from anywhere after you activated the env and it will place the files in the same place.

While you are in your env try pip_freeze to see what is currently installed in your virtual env.

If you are interested in troubleshooting this issue, run the freeze and check if you are using env as you should.

Upvotes: 2

Related Questions