ImportError: No module named virtualenv

前端 未结 8 2252
孤城傲影
孤城傲影 2021-02-01 00:50

I am using Django 1.3.7 and python 2.7.6 on windows7 I got an error when I executing my manage.py in this line of code

import shutil, sys, virtualenv, subprocess         


        
8条回答
  •  南旧
    南旧 (楼主)
    2021-02-01 01:40

    I had the same problem when I created my virtualenv via pycharm and installed requirements with pycharm. After trail and error , I found that installed requirements are not taken into account by the virtualenv.

    The solution is to reinstall all requirements once you have activated your virtualenv:

    venv\scripts\activate

    python -m pip install -r YourRequirements.txt

    Next time I'd better create my virtualenv directly with command line

提交回复
热议问题