![]() ![]() Output modules in requirements.txt pip freeze > requirements.txt Show installed modules in actual environment pip list Uninstall module XY pip uninstall module XY Upgrade module pip install moduleXY -upgrade Install virtual environment with specific python-version download and install the python-version - Important: remember the path to the python.exeĬreate a venv with: virtualenv envName -p path\to\new_python.exe Install all the packages from requirements.txt pip install -r requirements.txt Shows the used python version in the virtual env python -version Go back to the global environment deactivateĬreate new virtual env with specific python-version virtualenv -p C:\.path to.\Python37\python.exe p圓7_envĪctivate new virtual env named p圓7_env p圓7_env\Scripts\activate Pip install package # Only installs in the activated virtual environmentĮxtracts all the modules / dependencies to a txt-file pip freeze -local > requirements.txt When activated: pip list # Now only shows the installed modules for the virtual environment Shows where the python-file is (Linux) which pythonĬreate new virtual environment pj1_env virtualenv env OR python -m virtualenv envĪctivate environment venv\Scripts\activate Shows where the python-file is (Windows) where python ![]() Install virtualenv pip install virtualenv Import RapidTechTools as rtt # Import Module RapidTechTools (os.path.join('C:/', 'Users\path_to_module')) # Create Path to module yahoocrawler.py and rapidtechtools.py – all modules, wether they are needed or not have to imported in the program…) import sys, os Use modules / functions from other folder (not working with eg. When directly called – programm is running from here if _name_ = '_main_':Ĭheck which python version is installed python -version Import a module with abbreviation import numpy as np Import specific function of a module from math import ceil
0 Comments
Leave a Reply. |