{"id":1142,"hash":"0d7fc496e4a6cd53fab688bae293d9424691f5fd65415bc4a714d3631d0d277b","pattern":"Issue with virtualenv - cannot activate","full_message":"I created a virtualenv around my project, but when I try to activate it I cannot.\nIt might just be syntax or folder location, but I am stumped right now.\n\nYou can see below, I create the virtualenv and call it venv. Everything looks good, then I try to activate it by running source venv/bin/activate\n\nI'm thinking it might just have to do with my system path, but not sure what to point it to (I do know how to edit the path). I'm on python 7 / windows os, virtual env 2.2.x\n\nProcessing dependencies for virtualenv\nFinished processing dependencies for virtualenv\n\nc:\\testdjangoproj\\mysite>virtualenv --no-site-packages venv\nThe --no-site-packages flag is deprecated; it is now the default behavior.\nUsing real prefix 'C:\\\\Program Files (x86)\\\\Python'\nNew python executable in venv\\Scripts\\python.exe\nFile venv\\Lib\\distutils\\distutils.cfg exists with different content; not overwri\nting\nInstalling setuptools.................done.\nInstalling pip...................done.\n\nc:\\testdjangoproj\\mysite>source venv/bin/activate\n'source' is not recognized as an internal or external command,\noperable program or batch file.\n\nc:\\testdjangoproj\\mysite>source venv/bin/activate\n'source' is not recognized as an internal or external command,\noperable program or batch file.\n\nc:\\testdjangoproj\\mysite>source mysite/bin/activate\n'source' is not recognized as an internal or external command,\noperable program or batch file.\n\nc:\\testdjangoproj\\mysite>","ecosystem":"pypi","package_name":"windows","package_version":null,"solution":"source is a shell command designed for users running on Linux (or any Posix, but whatever, not Windows).\n\nOn Windows, virtualenv creates a .bat/.ps1 file, so you should run venv\\Scripts\\activate instead (per the virtualenv documentation on the activate script).\n\nJust run activate, without an extension, so the right file will get used regardless of whether you're using cmd.exe or PowerShell.","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/8921188/issue-with-virtualenv-cannot-activate","votes":298,"created_at":"2026-04-19T04:52:25.788697+00:00","updated_at":"2026-04-19T04:52:25.788697+00:00"}