[Virtual Env] Python build environment without anaconda (Windows edition)
1 min readFeb 26, 2021
When writing python some will use Conda for managing environment. for now I just notice Python also has build-in environment management tool name (virtual environment). so let get started.
Prerequisite
- install python 3.x
- add path in environment variable for call only “python”
- Generate virtual environment folder
python -m venv ./venvnaja
this will generate venvnaja folder in current directory.
note ** I use -naja suffix for mark as name. that mean “You can change as wanted” - activate environment via powershell and type
venvnaja/Script/activate.ps1
- try install package e.g. Pandas ,Numpy
- export current package version for install later
pip freeze > requirement.txt
this will create requirement.txt in current directory - for reinstall again package with defined requirement.txt (form 4) for test it work. You can try by delete all pandas folder in
venvnaja/Lib
for test reinstall package is work.
for reinstall package commandpip install -r ./requirement.txt
note for prevent forgot “eiei” byeeeeee