{"id":13460170,"url":"https://github.com/davidmarble/virtualenvwrapper-win","last_synced_at":"2025-03-24T18:33:16.903Z","repository":{"id":1297212,"uuid":"1239241","full_name":"davidmarble/virtualenvwrapper-win","owner":"davidmarble","description":"Port of Doug Hellmann's virtualenvwrapper to Windows batch scripts","archived":false,"fork":false,"pushed_at":"2022-03-18T12:50:28.000Z","size":191,"stargazers_count":460,"open_issues_count":23,"forks_count":106,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-10-07T07:48:17.334Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Batchfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidmarble.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-01-10T20:08:13.000Z","updated_at":"2024-09-26T03:27:15.000Z","dependencies_parsed_at":"2022-07-06T18:39:38.106Z","dependency_job_id":null,"html_url":"https://github.com/davidmarble/virtualenvwrapper-win","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidmarble%2Fvirtualenvwrapper-win","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidmarble%2Fvirtualenvwrapper-win/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidmarble%2Fvirtualenvwrapper-win/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidmarble%2Fvirtualenvwrapper-win/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidmarble","download_url":"https://codeload.github.com/davidmarble/virtualenvwrapper-win/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222004163,"owners_count":16914873,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T10:00:36.741Z","updated_at":"2024-10-29T06:30:27.489Z","avatar_url":"https://github.com/davidmarble.png","language":"Batchfile","funding_links":[],"categories":["Python","语言资源库","Batchfile"],"sub_categories":["python"],"readme":".. image:: https://github.com/davidmarble/virtualenvwrapper-win/actions/workflows/ci-cd.yml/badge.svg\n   :target: https://github.com/davidmarble/virtualenvwrapper-win/actions/workflows/ci-cd.yml\n\n.. image:: https://pepy.tech/badge/virtualenvwrapper-win/month\n   :target: https://pepy.tech/project/virtualenvwrapper-win\n\n\nvirtualenvwrapper-win\n=====================\n\nThis is a port of Doug Hellmann's `virtualenvwrapper \u003chttp://www.doughellmann.com/projects/virtualenvwrapper/\u003e`_\nto Windows batch scripts. The idea behind virtualenvwrapper is to ease usage of\nIan Bicking's `virtualenv \u003chttp://pypi.python.org/pypi/virtualenv\u003e`_, a tool\nfor creating isolated Python virtual environments, each with their own libraries\nand site-packages.\n\nThese scripts should work on any version of Windows (Windows XP, Windows Vista, Windows 7/8/10).\n\nHowever, they only work in the **regular command prompt**. They **will not work in Powershell.** There are other virtualenvwrapper projects out there for Powershell.\n\n\nInstallation\n------------\n**For Windows only**\n\nTo use these scripts from any directory, make sure the ``Scripts`` subdirectory of Python is in your PATH. For example, if python is installed in ``C:\\Python27\\``, you should make sure ``C:\\Python27\\Scripts`` is in your PATH.\n\nTo install, run one of the following::\n\n    # using pip\n    pip install virtualenvwrapper-win\n\n    # using easy_install\n    easy_install virtualenvwrapper-win\n\n    # from source\n    git clone git://github.com/davidmarble/virtualenvwrapper-win.git\n    cd virtualenvwrapper-win\n    python setup.py install   # or pip install .\n\n\n**WORKON_HOME (Optional)**\n~~~~~~~~~~~~~~~~~~~~~~~~~~\nAdd an environment variable WORKON_HOME to specify the path to store environments.\nBy default, this is ``%USERPROFILE%\\Envs``.\n\n**pywin (Optional)**\n~~~~~~~~~~~~~~~~~~~~\n**pywin** python version switcher (not included)\n\nIf you use several versions of python, you can switch between them\nusing a separate project `pywin\n\u003chttps://github.com/davidmarble/pywin\u003e`_. It's a lightweight\npython 2.5-3.3 launcher and switcher I wrote for the Windows\ncommand line and MSYS/MINGW32. It's similar to the `py.exe\nlauncher/switcher available in python 3.3\n\u003chttp://docs.python.org/3/using/windows.html#launcher\u003e`_, but\nwritten with basic Windows batch scripts and a shell script for\nMSYS/MINGW32 support. I use bash and command line shell tools from\n`msysgit \u003chttp://msysgit.github.com/\u003e`_, based on MSYS/MINGW32, to\ndo most of my python development on Windows.\n\nMain Commands\n-------------\n``mkvirtualenv [mkvirtualenv-options] [virtualenv-options] \u003cname\u003e``\n    Create a new virtualenv environment named *\u003cname\u003e*.  The environment will\n    be created in WORKON_HOME.\n\n    ``mkvirtualenv`` options:\n      -h                    Print help text.\n      -a project_path       Associate existing path as project directory\n      -i package            Install package in new environment. This option\n                            can be repeated to install more than one package.\n      -r requirements_file  requirements_file is passed to\n                            pip install -r requirements_file\n\n    any other options are passed on to the ``virtualenv`` command.                \n    For recent versions of ``virtualenv``, the ``-p`` / ``--python`` \n    can take version numbers instead of the full path to the interpreter,\n    e.g. ``mkvirtualenv -p3.5 \u003cname\u003e`` (assuming you have a Python 3.5.x\n    interpreter installed).\n    \n``lsvirtualenv``\n    List all of the enviornments stored in WORKON_HOME.\n\n``rmvirtualenv \u003cname\u003e``\n    Remove the environment *\u003cname\u003e*.\n\n``workon [\u003cname\u003e]``\n    If *\u003cname\u003e* is specified, activate the environment named *\u003cname\u003e* (change\n    the working virtualenv to *\u003cname\u003e*). If a project directory has been\n    defined, we will change into it. If no argument is specified, list the\n    available environments. One can pass additional option -c after\n    virtualenv name to cd to virtualenv directory if no projectdir is set.\n\n``deactivate``\n    Deactivate the working virtualenv and switch back to the default system\n    Python.\n\n``add2virtualenv \u003cfull or relative path\u003e``\n    If a virtualenv environment is active, appends *\u003cpath\u003e* to\n    ``virtualenv_path_extensions.pth`` inside the environment's site-packages,\n    which effectively adds *\u003cpath\u003e* to the environment's PYTHONPATH.\n    If a virtualenv environment is not active, appends *\u003cpath\u003e* to\n    ``virtualenv_path_extensions.pth`` inside the default Python's\n    site-packages. If *\u003cpath\u003e* doesn't exist, it will be created.\n\nConvenience Commands\n--------------------\n``cdproject``\n    If a virtualenv environment is active and a projectdir has been defined,\n    change the current working directory to active virtualenv's project directory.\n    ``cd-`` will return you to the last directory you were in before calling\n    ``cdproject``.\n\n``cdsitepackages``\n    If a virtualenv environment is active, change the current working\n    directory to the active virtualenv's site-packages directory. If\n    a virtualenv environment is not active, change the current working\n    directory to the default Python's site-packages directory. ``cd-``\n    will return you to the last directory you were in before calling\n    ``cdsitepackages``.\n\n``cdvirtualenv``\n    If a virtualenv environment is active, change the current working\n    directory to the active virtualenv base directory. If a virtualenv\n    environment is not active, change the current working directory to\n    the base directory of the default Python. ``cd-`` will return you\n    to the last directory you were in before calling ``cdvirtualenv``.\n\n``lssitepackages``\n    If a virtualenv environment is active, list that environment's\n    site-packages. If a virtualenv environment is not active, list the\n    default Python's site-packages. Output includes a basic listing of\n    the site-packages directory, the contents of easy-install.pth,\n    and the contents of virtualenv_path_extensions.pth (used by\n    ``add2virtualenv``).\n    \n``mkproject``\n    If the environment variable PROJECT_HOME is set, create a new project \n    directory in PROJECT_HOME and a virtualenv in WORKON_HOME.  The project path\n    will automatically be associated with the virtualenv on creation.\n\n``setprojectdir \u003cfull or relative path\u003e``\n    If a virtualenv environment is active, define *\u003cpath\u003e* as project\n    directory containing the source code.  This allows the use of ``cdproject``\n    to change the working directory. In addition, the directory will be\n    added to the environment using ``add2virtualenv``. If *\u003cpath\u003e* doesn't\n    exist, it will be created.\n\n``toggleglobalsitepackages``\n    If a virtualenv environment is active, toggle between having the\n    global site-packages in the PYTHONPATH or just the virtualenv's\n    site-packages.\n\n``whereis \u003cfile\u003e``\n    A script included for convenience. Returns the locations (on `%PATH%`)\n    that contain an executable `file`. You can call\n    ``whereis python`` to find all executables starting with ``python`` or\n    ``whereis python.exe`` for an exact match.\n\n\n``virtualenvwrapper``\n    Print a list of commands and their descriptions as basic help output.\n    (added in v.1.2.4)\n\nHooks\n-----\nTo run some commands after ``mkvirtualenv`` you can use hooks. First\nyou need to define ``VIRTUALENVWRAPPER_HOOK_DIR`` variable. If it is\nset ``mkvirtualenv`` will run ``postmkvirtualenv.bat`` script from\nthat directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidmarble%2Fvirtualenvwrapper-win","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidmarble%2Fvirtualenvwrapper-win","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidmarble%2Fvirtualenvwrapper-win/lists"}