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
amd running it, I got this error
C:\Django-Proj\>python manage.py update_ve Traceback (most recent call last): File "manage.py", line 4, in <module> import shutil, sys, virtualenv, subprocess ImportError: No module named virtualenv
Does anyone have an Idea about my case?
score:112
Install virtualenv using pip install virtualenv
.
If you have it already installed, try reinstalling it by removing it with pip uninstall virtualenv
and then reinstalling it.
Good Luck.
Similar question
- Apache with virtualenv and mod_wsgi : ImportError : No module named 'django'
- Apache virtualenv and mod_wsgi : ImportError : No module named 'django'
- ImportError: No module named virtualenv
- ImportError: No module named django.core.wsgi Apache + VirtualEnv + AWS + WSGI
- django + virtualenv + gunicorn - No module named django.core.wsgi?
- Django + mod_wsgi + apache: ImportError at / No module named djproj.urls
- Running django in virtualenv - ImportError: No module named django.core.management?
- No module named django.core when creating project in virtualenv
- Django Apache and Virtualenv ImportError: No module named site
- ImportError at / No module named quickstart in django rest framework
score:0
>virtualenv
ImportError: No module named 'virtualenv'
>pip uninstall virtualenv
PermissionError: [Errno 13] Permission denied:
>sudo pip uninstall virtualenv
Successfully uninstalled virtualenv-15.1.0
>pip install virtualenv
Collecting virtualenv
>virtualenv
Options:
Bingo!
score:0
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
Some more answer related to the same question
- ImportError: No module named setuptools.command on Mac OS X within virtualenv
- ImportError No module named localflavor.us.forms in Django 1.7
- ImportError Exception Value: No module named forms
- Running Django in Virtualenv on EC2 -- ImportError: No module named django.core.management
- Django - ImportError at /blog. No module named urls
- 500 internet server error error_log:TemplateSyntaxError: Caught ImportError while rendering: No module named friends
- Django-pipeline 'compressed' is not a valid tag library: ImportError raised loading pipeline.templatetags.compressed: No module named conf
- ImportError : no module named 'models'
- django virtualenv - Error: No module named south
- django : ImportError No module named myapp.views.hometest
score:0
Got this error when using the ansible pip module automating some pip installs on my localhost.
fatal: [localhost]: FAILED! => {"changed": false, "cmd": ["/opt/bin/virtualenv", "--system-site-packages", "-p/usr/bin/python3", "/opt/venv/myenv"], "msg": "\n:stderr: /usr/bin/python3: No module named virtualenv\n"}
Uninstalling virtualenv python3 -m pip uninstall virtualenv
did show virtualenv
was installed here /home/ubuntu/.local/bin/virtualenv
.
In the ansible task specify the virtualenv_command
:
- name: install requirements file
pip:
virtualenv_command: "/home/{{whoami.stdout}}/.local/bin/virtualenv"
virtualenv: "/home/{{whoami.stdout}}/.venv/{{item.env.virtualenv}}"
requirements: "/home/{{whoami.stdout}}/git/{{item.env.requirements_txt}}"
virtualenv_site_packages: yes
when: req_stat.stat.exists
score:5
I just ran into this same problem. I had to pip uninstall virtualenv
as a user with admin rights, then pip install virtualenv
as a normal user. I think it's some kind of permissions issue if you installed virtualenv under admin rights.
score:10
Try
python3 -m pip uninstall virtualenv
python3 -m pip install virtualenv
score:11
I think the problem is you need sudo
to globally install virtualenv.
> pip install virtualenv
Could not find an activated virtualenv (required).
> sudo pip install virtualenv
Downloading/unpacking virtualenv
...
But this creates files readable only by root (depending on the umask). In this case, uninstalling/reinstalling may not always help.
You can check with ls -la /usr/local/lib/python2.7/dist-packages/virtualenv.py
(replacing 2.7 with whatever version you have or are targeting).
My solution was simply:
sudo chmod -R o+rX /usr/local/lib/python2.7
score:12
Use pip3 instead of pip. I had the same issue and pip3 worked for me.
$ pip3 install virtualenv
$ virtualenv venv --python=python3
score:21
I had to install virtualenv with the -H flag to set HOME variable to target user's home dir.
sudo -H pip install virtualenv
Credit To: stackoverflow.com
Related Query
- ImportError at / No module named urls
- How to resolve ImportError "No module named pycurl"
- ImportError No module named blog
- ImportError while rendering: No module named app
- ImportError No module named views
- ImportError: No module named bootstrap3 even while using virtualenv
- ImportError at /login No module named login
- ImportError at /admin: No module named defaults
- google app engine (python): ImportError no module named django
- ImportError raised when trying to load 'blog.templatetags.blog_tags': No module named 'markdown
More Query from same tag
- how to get latest timestamp from the two columns in django
- Creating a notification system in Django
- Django delete an object
- Celery - run different workers on one server
- Django won't import values to database - sqlite3
- django StreamingHttpResponse - catch exception raised in streaming_content iterator
- Django: What is a permission codename?
- Python logging - overview of currently installed loggers/handlers
- highcharts is not working in django
- Pycharm CE not hitting breakpoints in my Django project
- How to trace this? AttributeError: 'NoneType' object has no attribute 'is_relation' during makemigrations
- Django: Faking a field in the admin interface?
- Django - implementation of select2 with url
- Cannot create django test database
- how can i make django file upload work with valums/file-uploader