when installing python check mark - add python to Path var
https://towardsdatascience.com/setup-an-environment-for-machine-learning-and-deep-learning-with-anaconda-in-windows-5d7134a3db10
https://www.youtube.com/watch?v=A7E18apPQJs
https://www.reddit.com/r/Python/comments/2crput/how_to_install_with_pip_directly_from_github/
https://machinelearningmastery.com/setup-python-environment-machine-learning-deep-learning-anaconda/
To install python packages using cmd
Setup python in Environmental variables - https://www.pythoncentral.io/add-python-to-path-python-is-not-recognized-as-an-internal-or-external-command/
If adding to environment vars doesnt work - set path=C:\Python24 in cmd, then type 'python' to check if it z working
set - cd PATHoftheModule
Type - python setup.py install]
pip.main(['install','-e','C:/Users/spashikanti/Downloads/scikit-plot-master'])
- In git - Type bash, git commands to see if they are working
Download Visual studio installer - https://visualstudio.microsoft.com/downloads/
How to install visual studio installer - https://stackoverflow.com/questions/29846087/microsoft-visual-c-14-0-is-required-unable-to-find-vcvarsall-bat
http://docs.anaconda.com/anaconda/user-guide/getting-started/
- After installation, check if anaconda prompt and anaconda navigator are installed
- In Anaconda prompt, type python, conda (or) conda list , jupyter notebook to see if they are installed or not
- Run Anaconda navigator as Administrator if error related to user appears
If python/conda are not recoginzed - https://medium.com/@GalarnykMichael/install-python-on-windows-anaconda-c63c7c3d1444
https://stackoverflow.com/questions/31935714/how-to-install-rodeo-ide-in-anaconda-python-distribution
https://medium.com/@GalarnykMichael/setting-up-pycharm-with-anaconda-plus-installing-packages-windows-mac-db2b158bd8c
https://stackoverflow.com/questions/11438727/how-to-use-subprocess-to-run-a-virtualenv-package-install
https://www.youtube.com/watch?v=z0qhKP2liHs
To install pip - After installing Anaconda Nagivator use cmd - conda install pip
Update Anaconda - "conda update conda" , "conda update --all"
Install packages - conda install package-name #In Anaconda Prompt
Update packages - conda update package-name #In Anaconda Prompt
Upgrade Packages using pip - "python -m pip install --upgrade pip" #In Anaconda Prompt
conda update pip #In Anaconda Prompt
check pip version - pip --version #In Anaconda Prompt
To Open jupyter notebook type - jupyter notebook in Anaconda prompt
https://nbviewer.jupyter.org/github/fastai/course-v3/blob/master/nbs/dl1/00_notebook_tutorial.ipynb
- Install packages directly in Jupyter notebook
import sys
!{sys.executable} -m pip install gensim
-
Install Keras with pip
!pip install -q keras
import keras -
Install 2.0 version of tensorflow
!pip install tensorflow==2.0.0-beta0 -
Install GraphViz with apt
!apt-get install graphviz -y -
Import files into Google Colab - https://towardsdatascience.com/3-ways-to-load-csv-files-into-colab-7c14fcbdcb92
from google.colab import files
uploaded = files.upload()
- Install using Anaconda website, https://conda.anaconda.org/conda-forge ,look for package and see the syntax associated with the specific package u r looking for
conda install -c https://conda.anaconda.org/conda-forge wordcloud #wordcloud package
conda install -c anaconda tensorflow #tensorflow package
https://stackoverflow.com/questions/41409570/cant-install-wordcloud-in-python-anaconda - Install packages from whl: wordcloud, rpy2 Save file from below link in the cd directory of Anaconda Prompt
pip install rpy2-2.9.5-cp37-cp37m-win_amd64.whl
https://www.lfd.uci.edu/~gohlke/pythonlibs/#rpy2
https://stackoverflow.com/questions/30083067/encountering-error-when-installing-rpy2-tried-to-guess-rs-home-but-no-r-comman - Install from github
- Below code works
git clone https://github.com/cbellei/word2veclite.git
cd word2veclite
pip install . (OR) python setup.py install - pip install -U git+https://github.com/scikit-learn-contrib/imbalanced-learn.git
- If setup.py is not present the above code doesn't work. Just an unfinished, broken package, it isn't supposed to be installed by Python tools. Install it manually — clone the repo and copy files to site-packages.
- Not sure if the below one works
pip install -e git+https://github.com/package-name/package-name.git#egg=package-name
and then again type command - pip install package-name - Another
Type the command GitBash 'pip install git+https://github.com/cbellei/word2veclite.git'
Type in cmd 'pip install word2veclite'
Packages are stored in this location - C:\Users\User\AppData\Local\Programs\Python\Python37\Lib\site-packages
- Below code works
- Install torch, use command in this website - https://pytorch.org/
- Install fastai - conda install -c pytorch -c fastai fastai
https://forums.fast.ai/t/howto-installation-on-windows/10439
Install using new env using conda https://forums.fast.ai/t/fastai-v0-7-install-issues-thread/24652
https://github.com/fastai/fastai/blob/master/README.md#installation
Set up AWS EC2 instance for fastai https://course.fast.ai/start_aws.html
pip install --upgrade setuptools - Install Tensorflow:
Step by step instructions: https://media.readthedocs.org/pdf/tensorflow-object-detection-api-tutorial/latest/tensorflow-object-detection-api-tutorial.pdf
Install java, check bios update, install latest drivers from dell
Tensorflow is not supported in 3.7, install 3.6 version from https://www.python.org/downloads/windows/
python -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl #Whole line is a command
https://github.com/bhavsarpratik/install_Tensorflow_Windows #Requires gpu
https://medium.com/datadriveninvestor/install-python-3-6-and-tensorflow-92eeff0ad4f5 - Install Valx - https://github.com/Tony-Hao/Valx
Here the Valx_core module is stored as python file - Python Modules https://docs.python.org/3/tutorial/modules.html
cd directory path
In the above directory save few functions in XYZ.py file
Go to Jupyter notebook - Use 'Import XYZ' to be able to use the python module
* A few ways to solve errors https://www.tensorflow.org/install/errors
https://github.com/aymericdamien/TensorFlow-Examples
#### Create Environments https://media.readthedocs.org/pdf/tensorflow-object-detection-api-tutorial/latest/tensorflow-object-detection-api-tutorial.pdf
To identify environments installed: conda info --envs
Environments are loaded at: C:\ProgramData\Anaconda3\envs
Ideally you should install each variant(tensorflow & tensorflow-gpu) under a different (virtual) environment.
* tensorflow_cpu - Environment for * tensorflow - Environment to do chapter2,3 of Tensorflow setup documentation pdf
conda install scipy
pip install --upgrade sklearn
pip install --upgrade pandas
pip install --upgrade pandas-datareader
pip install --upgrade matplotlib
pip install --upgrade pillow
pip install --upgrade requests
pip install --upgrade h5py
pip install tensorflow==1.8.0
pip install keras==2.2.0
Use either _ instead of -
Use no space/join words instead of -
Use shortform direct in import command. for eg- scikit-optimize is used in pip install command, but in import command directly use skopt
- Install/Upgrade Packages
import pip
import subprocess
subprocess.check_call(["python", '-m', 'pip', 'install', 'scipy']) # install pkg - pkg name should all be small letter NO CAPITALS
subprocess.check_call(["python", '-m', 'pip', 'install',"--upgrade", 'scipy']) # upgrade pkg - pkg name should all be small letter NO CAPITALS
from scipy import *
import scipy as sy - Check Version of pip installed
pip.version - List of all installed packages
import subprocess
import sys
reqs = subprocess.check_output([sys.executable, '-m', 'pip', 'freeze'])
installed_packages = [r.decode().split('==')[0] for r in reqs.split()]
print(installed_packages)
- Upgrade pip
pip.main(['install', '--upgrade', 'pip']) - Install and Upgrade Packages in Rodeo
import pip
pip.main(['install','SciPy']) # install pkg
pip.main(['install', '--upgrade', 'statsmodels']) # upgrade pkg
from scipy import *
import scipy as sy
- Packages that have -
import pip
pip.main(['install','scikit-learn'])
pip.main(['install', '--upgrade', 'statsmodels'])
from sklearn import *
import sklearn as sklearn
- Packages that have -
import pip
- General
import numpy as np
import pandas as pd
import os - Visualization
import seaborn as sns
import matplotlib.pyplot as plt
%matplotlib inline
https://github.com/andfanilo/ieee-fraud-detection
- Could not find a version that satisfies the requirement opencv (from versions: ) No matching distribution found for opencv
- Either the python version required for the package is not present
- Module/Package name is wrong/incorrect. Eg codecs is actually part of 'openapi-codec'
- Building wheel error: pip install --no-cache-dir MODULENAME
- python setup.py egg_info failed with error code 1
- pip install --upgrade setuptools
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Hewlett-Packard\SimplePass;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\Git\cmd;C:\Users\User\AppData\Local\Programs\Python\Python37\Scripts;C:\Users\User\AppData\Local\Programs\Python\Python37;C:\Users\User\Anaconda3;C:\Users\User\Anaconda3\Library\mingw-w64\bin;C:\Users\User\Anaconda3\Library\usr\bin;C:\Users\User\Anaconda3\Library\bin;C:\Users\User\Anaconda3\Scripts;C:\Users\User\AppData\Local\rodeo\app-2.5.2\bin;C:\Users\User\AppData\Local\rodeo\app-2.5.2\resources\conda