iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Install a supported Python 3 interpreter, verify the command your terminal uses, then create a project-local environment with python -m venv .venv. Activate that environment before installing packages, and use python -m pip so each dependency is written to the project environment rather than to a system-wide Python installation.
This guide covers the standard-library workflow on Windows, macOS and Linux. It explains how to select the right interpreter, handle Windows PowerShell execution policy, record dependencies, rebuild a damaged environment and diagnose the most common setup errors.
What you are installing
Python is the interpreter that runs .py programs and the package-management commands used by those programs. A virtual environment is a separate directory containing an environment-specific Python configuration and package location. The Python documentation describes venv as creating lightweight environments with independent sets of packages in their own “site” directories.
Recommended Free Tools
A virtual environment is not a second operating-system installation of Python. It is created from a Python interpreter that is already installed on the computer. If Python is absent, python -m venv .venv cannot work until you install Python first.
#1 Best Overall
- Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
- With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
- Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
- Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
- Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.
When the environment is active, package installs normally go into that environment. Project A can therefore use one version of a library while Project B uses another, without changing the base installation or other environments. The isolation is intended for project dependencies; it is not a security boundary and does not replace normal operating-system permissions or application security.
Choose and install a Python interpreter
Use an official Python distribution or an operating-system package source appropriate to your platform. The exact installer, package name and command differ by operating system and Linux distribution, so do not copy a single Linux command as if it were universal. The Python Packaging User Guide distinguishes official downloads from OS-managed installations and recommends checking current platform instructions rather than relying on an old release number.
| Platform or route | What to do | Important qualification |
|---|---|---|
| Windows | Install a supported Python 3 release using the current official Windows instructions. If the installer offers an option to add Python to your PATH, understand that this changes which command your terminal can find. | The Python launcher command py is commonly available on Windows, but it is not guaranteed on every installation. |
| macOS | Use the current official macOS installation guidance or a package source you intentionally manage. Afterward, check whether your terminal invokes the installed interpreter as python or python3. |
Do not assume that a pre-existing system or developer-tool Python is the version you intend to use. |
| Linux | Follow the instructions for your distribution and release, then verify the resulting command. Distribution repositories, package names and Python command aliases vary. | No single apt, dnf, pacman or other command is correct for every Linux system. |
| Managed or restricted computer | Use the approved software channel or ask the administrator to install a supported interpreter. | You may not be allowed to modify PATH, install packages or change PowerShell policy. |
The Packaging User Guide currently describes its tutorial as applying to supported Python versions, listed there as Python 3.8 and higher at the time of that guidance. Supported versions change, so check the live documentation when choosing a new installation. The venv module itself has been part of Python since Python 3.3.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Verify the interpreter before creating anything
Open a new terminal after installation so it reads any PATH changes. Try the command that matches your platform:
python --versionis common when the installer created apythoncommand.python3 --versionis common on Unix-like systems wherepythonis reserved for another installation or is not defined.py --versionis available on Windows installations that include the Python launcher.
Use the command that prints the supported Python 3 version you intend to use. If a command reports that it cannot be found, Python is either not installed, the terminal has not been reopened, or the interpreter directory is not on PATH. Recheck the platform-specific installation instructions before creating a virtual environment.
For a definitive check of the executable selected by a command, ask Python to print its path:
python -c "import sys; print(sys.executable)"
Substitute python3 or py if that is the command that successfully reports your version. This check matters when several Python installations are present: the environment will be based on the interpreter you actually invoke.
Create a project-local environment
Keep the environment inside the project directory and use the conventional name .venv. The leading dot keeps it unobtrusive in directory listings, while the name makes the purpose clear to collaborators and tools.
Rank #2
- Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
- Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
- Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
- Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
- Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
- Create or open the directory for your project.
- Change the terminal’s current directory to that project directory.
- Run the environment command with the interpreter you verified:
python -m venv .venv
If your working interpreter is versioned, use its command instead, for example:
python3 -m venv .venv
On a Windows installation that uses the launcher, this equivalent form selects a Python installation through py:
py -m venv .venv
Creating the directory can take a moment. A successful run normally returns to the prompt without a message. The new .venv directory contains the environment’s scripts and configuration; it does not contain your project source code and it does not install third-party packages by itself.
If a directory named .venv already exists, do not blindly overwrite it. First determine whether it belongs to this project and whether it was created by the Python interpreter you want. A moved or copied environment can retain absolute paths from its original location. When in doubt, remove the old environment directory and create a new one in the project directory instead of trying to repair or relocate it.
Activate the environment for your shell
Activation adjusts the current shell so that commands such as python and pip resolve to the environment. It does not permanently alter the base installation. Use the script that matches both your operating system and your shell.
Unix-like systems using bash or a compatible shell
source .venv/bin/activate
This form is the documented example for bash on macOS and Linux. The environment name usually appears in parentheses at the start of the prompt, such as (.venv). That prompt marker is a convenience, not proof by itself; verify the interpreter in the next section.
Windows PowerShell
.venvScriptsActivate.ps1
PowerShell can block local scripts under its execution-policy settings. If activation is refused and you are permitted to change the policy for your account, the venv documentation gives this user-scoped option:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
CurrentUser limits the change to your Windows account rather than changing policy for every user on the computer. RemoteSigned allows locally created scripts while applying signature rules to scripts obtained from elsewhere. This is a configuration choice with security implications; do not bypass policy with a system-wide change merely to follow a beginner tutorial. On a managed computer, ask the administrator for the approved procedure.
Rank #3
- 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
- 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
- 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
- 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
- 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
Windows Command Prompt
.venvScriptsactivate.bat
Command Prompt and PowerShell use different activation scripts. Running a PowerShell command in Command Prompt, or vice versa, produces a confusing “not recognized” or script error even when the environment itself is valid.
Other Unix shells
The tutorial’s source example is for bash and compatible shells. The environment also includes shell-specific activation scripts for shells such as csh and fish. Use the script supplied for the shell you are actually running rather than adapting bash syntax by guesswork. You can also invoke the environment’s interpreter directly without activation when a script or automation workflow requires that approach.
Confirm that activation selected the right Python
With the environment active, run the same executable check again:
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorspython -c "import sys; print(sys.executable)"
The printed path should point inside your project’s .venv directory. Check pip through that interpreter as well:
python -m pip --version
The reported pip location should be associated with .venv, not a system or user package directory. If it points elsewhere, activation did not take effect or you are using a different terminal session. Close and reopen the shell if necessary, activate again, and repeat both checks.
Install project packages safely
Install a package only after the environment is active and its interpreter has been verified. The packaging guides use this pattern:
python -m pip install requests
requests is only an example; replace it with a dependency your project actually needs. Calling pip as a module of the selected Python is safer than typing a standalone pip command when multiple Python installations exist, because the module invocation ties pip to the interpreter named by python.
After installation, the package is available to programs run with that environment’s Python. A package installed while the environment is inactive may instead be placed in the base interpreter or a user-level location, leaving the project unable to import it. If an import fails, check the executable and pip paths before installing the package again.
Rank #4
- 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
- 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
- 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
- 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
- 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
Record dependencies so the environment can be rebuilt
A virtual environment is disposable. Record the packages and versions your project requires in a requirements file kept with the project source. A simple file might contain one dependency per line:
requests
Use the active environment to install the recorded set into a newly created environment:
python -m pip install -r requirements.txt
The file is project information; .venv is generated state. Keep the requirements file under version control, but exclude the environment directory itself. A typical ignore entry is:
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →.venv/
Do not commit the environment’s binaries or package directories to a repository. They can contain machine-specific paths and are not a portable substitute for dependency information. When another contributor checks out the project, that person should install a supported Python interpreter, create a fresh .venv and install from the requirements file.
Use, leave and recreate the environment
Run project commands
While the environment is active, run your application, tests and package commands with python. This keeps all of those operations tied to the same interpreter and package set that you checked with sys.executable.
Deactivate when finished
To return the current shell to its previous command resolution, run:
deactivate
This does not delete the environment or uninstall packages. It only removes the activation changes from the current shell. A later terminal session must be activated again before project-specific packages are available by default.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rebuild instead of moving or copying
Virtual environments are designed to be recreated, not moved between directories or copied to another computer. If the project path changes, the interpreter changes, or the environment becomes inconsistent, create a new .venv in the current project directory and install the requirements file. This approach also provides a clean recovery from accidental package changes.
Best Value
- 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
- 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
- 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
- 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
- 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
- Deactivate the old environment if it is active.
- Remove the old
.venvdirectory using your operating system’s normal file-management method. - Run the appropriate
python -m venv .venv,python3 -m venv .venvorpy -m venv .venvcommand from the project directory. - Activate the new environment with the script for your shell.
- Install the recorded dependencies with
python -m pip install -r requirements.txt.
Troubleshoot common setup failures
“Python” or “python3” is not recognized
The interpreter is missing, the command name differs on your platform, or the terminal has stale PATH information. Try the alternative command listed earlier, open a new terminal, and verify the installation using the platform’s current official instructions. On Windows, check whether py is available. On Linux, consult the documentation for your exact distribution instead of applying a command from another distribution.
venv cannot be found
Make sure you invoked the intended Python 3 interpreter and that the command is being run from the project directory. A very old or unusual Python installation may not provide the expected standard-library module. Install or select a supported Python version, verify its executable path, then retry the creation command.
Activation script is not recognized
Confirm the path and shell: PowerShell uses .venvScriptsActivate.ps1, Command Prompt uses .venvScriptsactivate.bat, and bash uses source .venv/bin/activate. Run the command from the directory that contains .venv. If PowerShell reports a policy restriction, consider the user-scoped RemoteSigned setting described above or follow your organization’s policy.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallPackages install but the application cannot import them
Check both executable paths while the environment is active:
python -c "import sys; print(sys.executable)"
python -m pip --version
If either path is outside .venv, activate the environment again and use python -m pip install .... Also ensure that the application is launched with the same environment’s Python rather than with a separately configured interpreter in an editor or task runner.
The environment worked until the project was moved
Do not copy or patch the old directory. Recreate .venv at the new location and reinstall from the requirements file. This avoids stale path references and restores the intended project-local layout.
venv versus virtualenv
For ordinary project isolation, the standard-library venv module is the simplest starting point. The packaging guide also documents virtualenv, a separately installed alternative. Choose based on the project’s compatibility and workflow needs rather than adding a second tool automatically.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →| Consideration | venv |
virtualenv |
|---|---|---|
| Installation | Included with Python 3.3 and later, so no separate environment tool is required for the normal case. | Must be installed separately before it can create environments. |
| Basic project setup | Provides the standard command, python -m venv .venv. |
Provides an alternative workflow when a project specifically calls for it. |
| Compatibility decision | Best default when the selected supported Python supplies venv. |
Worth evaluating when the project needs features or Python-version compatibility beyond the standard-library workflow. |
| What both provide | An isolated package location that keeps project dependencies separate from the base installation and other environments. | |
Installing an additional tool does not solve a missing base interpreter. Both approaches require Python to be installed first, and both still require you to select, activate and verify the environment used by your project.
A practical setup checklist
- Install a currently supported Python 3 interpreter using the instructions for your operating system.
- Open a fresh terminal and confirm the version and executable path.
- Change to the project directory before creating the environment.
- Create
.venvwith the command belonging to the intended interpreter. - Activate it with the script for the shell you are actually using.
- Verify that both
sys.executableandpython -m pip --versionpoint into.venv. - Install only the project’s required packages through
python -m pip. - Record dependencies in a requirements file and use that file to rebuild a fresh environment.
- Exclude
.venv/from version control. - Deactivate when finished, and recreate rather than move an environment when its path or interpreter changes.
Once these checks pass, Python itself is installed at the system level and your project has a separate, reproducible package area. Future projects can repeat the same pattern with their own .venv directory and dependency file.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

