Python Virtual Environments

Packages list with versions saving using Pip

pip list # shows the packages

pip freeze > requirements.txt# save all packages

To create a virtual environment with the above packages

python3 -m venv myEnv
source myEnv/bin/activate
pip install -r requirements.txt

Packages list with versions saving using Conda

conda list # shows packages list

# save all packages either in txt or yaml file. yaml is better and commonly used

conda list -e requirements.txt

conda env export > myEnv.yml

To create a virtual environment with the above packages

conda create — name myEnv— file requirements.txt

or

conda env create -f myEnv.yml

--

--

--

Imran is a computer vision and AI enthusiast with a PhD in computer vision. Imran loves to share his experience with self-improvement and technology.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

[4k-HD]▷鬼滅之刃劇場版 無限列車篇 線上看完整版ZH(Kimetsu no Yaiba: Mugen Ressha-Hen, (2020-HD)在线观看完整版本- 高清电影

Information Theory’s application [in my world]

Journey as a Chapter Leader of CodeChef College Chapter

Auto-format beautiful SQL tables!

Distribute React Native App Using Microsoft App Center (CI CD Process)

4-in-1 Priority First Search in Python: BFS, DFS, Prim’s, and Dijkstra’s algorithms

Learn Coding Skeptically

readyz and livez: Getting started with Kubernetes health endpoints using NodeJS/Express

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Imran Bangash

Imran Bangash

Imran is a computer vision and AI enthusiast with a PhD in computer vision. Imran loves to share his experience with self-improvement and technology.

More from Medium

Pip commands and virtual env in python

Properties in Python

The Minion Game with Python

Insertion Sort In Python