반응형
반응형

 

Mlxtend (machine learning extensions) is a Python library of useful tools for the day-to-day data science tasks.

 

https://github.com/rasbt/mlxtend 

 

GitHub - rasbt/mlxtend: A library of extension and helper modules for Python's data analysis and machine learning libraries.

A library of extension and helper modules for Python's data analysis and machine learning libraries. - GitHub - rasbt/mlxtend: A library of extension and helper modules for Python's data an...

github.com

Installing mlxtend

PyPI

To install mlxtend, just execute

pip install mlxtend  

Alternatively, you could download the package manually from the Python Package Index https://pypi.python.org/pypi/mlxtend, unzip it, navigate into the package, and use the command:

python setup.py install

Conda

If you use conda, to install mlxtend just execute

conda install -c conda-forge mlxtend 

반응형
반응형

 

pip install pandas 

 

conda install -c anaconda pandas 

When working with tabular data, such as data stored in spreadsheets or databases, pandas is the right tool for you. pandas will help you to explore, clean, and process your data. In pandas, a data table is called a DataFrame.

반응형
반응형

1. Anaconda 3버전과 Visual Studio Code (이하 vscode) 준비

(일반 Python을 사용하시는 분은 pip을 같이 설치해주세요)

 

2. vscode에 Python (Microsoft) Extension 설치

 

3. 가상환경에 autopep8 패키지 설치 (PEP8 기준 자동정렬 기능 추가)

(아나콘다 기준)  conda install --name 가상환경명 autopep8

(pip 기준)  pip install autopep8

 

위의 명령어로 직접 설치하지 않아도 vscode 내에서 자동정렬 키를 누르면 패키지를 설치하겠냐는 팝업이 뜹니다.

 

4. 가상환경에 pylint 패키지 설치 (구문오류 체크)

(아나콘다 기준)  conda install --name 가상환경명 pylint

(pip 기준)  pip install pylint

 

위의 명령어로 직접 설치하지 않아도 저장이나 build 시 패키지를 설치하겠냐는 팝업이 뜹니다.

 

 

5. 마우스 우클릭 혹은 Command Palette(F1키)에서 Run Python File in Terminal을 선택하면 Terminal에서 실행

 

입맛에 따라 단축키를 지정해주시면 빠르게 실행결과를 볼 수 있습니다.


[오류]conda: 'conda' 용어가 cmdlet,함수,스크립트 파일 또는 실행할 수 있는 프로그램 이름으로 인식되지 않습니다.

 

VSCODE 에서 python 연동하기. 

 

Visual Studio Code의 기본 터미널이 Windows의 Power Shell로 설정되어 있기 때문.

 

    "terminal.integrated.defaultProfile.windows":"Command Prompt",
    "python.terminal.activateEnvInCurrentTerminal": true

settings.json에서 cmd.exe 추가하고, python.terminal.activateEnvInCurrentTerminal : true 로 변경하면  

해당 편집파일에서 "Run Python File" 실행시 cmd 실행되면서 python ENV 가 activate가 되면서 파일이 실행 된다. 

 

 

 

 

 

https://velog.io/@dbal9357/conda-conda-%EC%9A%A9%EC%96%B4%EA%B0%80-cmdlet%ED%95%A8%EC%88%98%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8-%ED%8C%8C%EC%9D%BC-%EB%98%90%EB%8A%94-%EC%8B%A4%ED%96%89%ED%95%A0-%EC%88%98-%EC%9E%88%EB%8A%94-%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%A8-%EC%9D%B4%EB%A6%84%EC%9C%BC%EB%A1%9C-%EC%9D%B8%EC%8B%9D%EB%90%98%EC%A7%80-%EC%95%8A%EC%8A%B5%EB%8B%88%EB%8B%A4

 

[오류]conda: 'conda' 용어가 cmdlet,함수,스크립트 파일 또는 실행할 수 있는 프로그램 이름으로 인식

원인 Visual Studio Code의 기본 터미널이 Windows의 Power Shell로 설정되어 있기 때문.해결이 기본 터미널의 종류를 cmd 또는 Git Bash로 변경하면 오류없이 실행이 가능.방법setting.json파일이 열리면 ""안에 c

velog.io

 

반응형
반응형



** 설치된 모듈의 위치정보 등 알아내기


    --  pip show  설치된모듈이름



 



TensorFlow on Windows: “Couldn't open CUDA library cudnn64_5.dll”




First of all, note that cuDNN is not distributed with the rest of the CUDA toolkit, so you will need to download it separately from the NVIDIA website. On Windows, it is distributed as a ZIP archive, so you must extract it and find the directory containing cudnn64_5.dll. For example, if you extract it to C:\tools\cuda, the DLL will be in C:\tools\cuda\bin\cudnn64_5.dll. Finally, you can add it to your path by typing the following at the command prompt:


C:\> set PATH=%PATH%;C:\tools\cuda\bin

C:\> python

...

>>> import tensorflow as tf


 

 I didn't have such issues with TensorFlow 0.12.1 (installed with pip install tensorflow==0.12.1):

 



---------------------------------------------------------------------------------

KNL

---------------------------------------------------------------------------------


matplotlib install  -  http://matplotlib.org/faq/installing_faq.html


> pip install matplotlib


or 


> git clone git://github.com/matplotlib/matplotlib.git

> cd matplotlib

> python setup.py install

> python setup.py develop


matplotlib test 

http://matplotlib.org/faq/howto_faq.html#how-to-search-examples


---------------------------------------------------------------------------------


konlpy install - http://konlpy.org/ko/v0.4.3/install/


> pip install --upgrade pip

> pip install JPype1-0.5.7-cp27-none-win_amd64.whl


> pip install konlpy


Binary Install

Ensure you have installed Anaconda/Miniconda. Instructions can be found here.

Install from the conda-forge software channel:


conda install -c conda-forge jpype1


$ pip install wheel


jpype  download : http://www.lfd.uci.edu/~gohlke/pythonlibs/#jpype


---------------------------------------------------------------------------------


JAVA_HOME 설정 

java 설치 - http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html


환경변수 - JAVA_HOME  C:\Program Files\Java\jdk1.8.0_121


---------------------------------------------------------------------------------


To install this package with conda run: https://anaconda.org/anaconda/gensim


> conda install -c anaconda gensim=1.0.1


To install this package with conda run: https://anaconda.org/anaconda/scipy


> conda install -c anaconda scipy=0.19.0



---------------------------------------------------------------------------------


sklearn install


https://sourceforge.net/projects/scikit-learn/files/


sklearn test 

http://scikit-learn.org/stable/modules/generated/sklearn.model_selection.train_test_split.html


---------------------------------------------------------------------------------


Activate the conda environment by issuing the following command:


C:> activate tensorflow

 (tensorflow)C:>  # Your prompt should change 




예제 :: 

Saved model checkpoint to D:\PythonProject\cnn-text-classification-tf-master\runs\1490667625\checkpoints\model-1000



word2vec_example - https://gist.github.com/solaris33/8ce9913dea1aa4225876cbcfdd2963be#file-word2vec_example-py



Pycharm & tensorflow & Anaconda = http://yeramee.tistory.com/1


anaconda > tensorflow install : http://www.lfd.uci.edu/~gohlke/pythonlibs/#tensorflow





starting jupyter notebook

> jupyter notebook 

or 

> jupyter notebook --port 9999





5-1. 텐서플로우(TensorFlow)를 이용해 자연어를 처리하기(NLP) – Word Embedding(Word2vec) :: http://solarisailab.com/archives/374


jupyter notebook 사용하기 : http://goodtogreate.tistory.com/entry/IPython-Notebook-%EC%84%A4%EC%B9%98%EB%B0%A9%EB%B2%95




.

반응형

+ Recent posts