Create a Virtual Environment with python3
1 |
python3 -m venv /path/to/new/virtual/environment |
Create a Virtual Environment with python3
1 |
python3 -m venv /path/to/new/virtual/environment |
To create a virtual environment running Python version 3 using VirtualEnv run the following command:
virtualenv env_name -p python3
We use the -p option to specify the version of Python we want to use. Without this, it will default to Python version 2 which comes installed by default on macOS.
After activating the virtual environment with source bin/activate , run python --version to show the version of python in use.
203 °F scattered clouds
Compressing a folder:
1 |
zip -r archive_name.zip folder_to_compress |
1 |
zip -r -X archive_name.zip folder_to_compress |
Note: With the -X option, you are compressing without the invisible files such as “_MACOSX” or “._Filename”
Extracting an archive:
1 |
unzip archive_name.zip |
Copy a folder:
scp -r username@example.com:/path/to/foo ./home/user/Desktop/
Copy a file:
scp username@example.com:/path/to/foo.zip ./home/user/Desktop/
1 |
docker rmi $(docker images -q) |
1 |
docker rm -f $(docker ps -a -q) |