1. node.js와 npm 설치가 먼저 선행되어야 함.
먼저, 저장소를 업데이트합니다.
sudo apt update
그 다음, Node.js를 설치합니다.
sudo apt install nodejs -y
이제, npm을 설치합니다.
sudo apt install npm -y
Node.js와 npm이 정상적으로 설치되었는지 확인합니다.
node --version
npm --version
Node Version Manager(nvm)를 사용하는 방법:
nvm을 사용하면 다양한 버전의 Node.js를 쉽게 설치하고 관리할 수 있습니다.
먼저 nvm을 설치하기 위한 스크립트를 다운로드하고 실행합니다.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
nvm을 설치한 후에, 새 터미널 창을 열거나 기존 터미널 창의 환경을 다시 로드합니다.
source ~/.bashrc
nvm을 사용하여 원하는 버전의 Node.js를 설치합니다. 예를 들어, 최신 LTS 버전을 설치하려면 다음 명령어를 사용합니다.
nvm install --lts
Node.js와 함께 설치된 npm이 있는지 확인합니다.
node --version
npm --version
이 중에서 가장 적합한 방법을 선택하여 Node.js와 npm을 설치하고 사용할 수 있습니다.
2. cmake가 설치 안되있다면 설치
sudo apt-get install cmake -y
cmake가 설치되었는지 확인하세요. 터미널에서 다음 명령어를 실행합니다:
cmake --version
설치가 성공적으로 완료되었다면, cmake 버전이 출력됩니다.
3. Boost 라이브러리 설치
우분투에서 Boost 라이브러리를 설치하려면, 아래와 같은 명령어를 터미널에서 실행하세요:
sudo apt-get update
sudo apt-get install libboost-all-dev -y
4. 파이썬 perspective 라이브러리 설치
pip install perspective-python
5. 주피터랩에서 perspective 확장 설치
먼저 Extension 기능 Enable한 후 아래와 같이 검색하거나 명려어 입력으로 설치
jupyter labextension install @finos/perspective-jupyterlab
Perspective 공식 홈페이지
https://perspective.finos.org/docs/python/
[참고] 오류 내용
- 오류내용 : cmake가 필요하다는 내용
jovyan@aaa:~$ pip install perspective-python
Collecting perspective-python
Downloading perspective-python-2.0.1.tar.gz (7.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.0/7.0 MB 10.8 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [15 lines of output]
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/opt/conda/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/opt/conda/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-uj6b3_f8/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/tmp/pip-build-env-uj6b3_f8/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-uj6b3_f8/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup
exec(code, locals())
File "<string>", line 45, in <module>
Exception: Requires cmake
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
- 오류내용 : Boost 라이브러리가 필요하다는 내용
CMake Error at /opt/homebrew/Cellar/cmake/3.26.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Boost (missing: Boost_INCLUDE_DIR)
Call Stack (most recent call first):
/opt/homebrew/Cellar/cmake/3.26.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/opt/homebrew/Cellar/cmake/3.26.3/share/cmake/Modules/FindBoost.cmake:2377 (find_package_handle_standard_args)
CMakeLists.txt:276 (find_package)
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "/Users/shinaelee/Compose/myvenv/myenv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
main()
File "/Users/shinaelee/Compose/myvenv/myenv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Users/shinaelee/Compose/myvenv/myenv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 249, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/private/var/folders/jp/j992by256v53v2qry6q5zd080000gn/T/pip-build-env-epqyex5v/overlay/lib/python3.10/site-packages/jupyter_packaging/build_api.py", line 23, in build_wheel
val = orig_build_wheel(
File "/private/var/folders/jp/j992by256v53v2qry6q5zd080000gn/T/pip-build-env-epqyex5v/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 416, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "/private/var/folders/jp/j992by256v53v2qry6q5zd080000gn/T/pip-build-env-epqyex5v/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 401, in _build_with_temp_dir
self.run_setup()
File "/private/var/folders/jp/j992by256v53v2qry6q5zd080000gn/T/pip-build-env-epqyex5v/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup
exec(code, locals())
File "<string>", line 291, in <module>
File "/private/var/folders/jp/j992by256v53v2qry6q5zd080000gn/T/pip-build-env-epqyex5v/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup
return distutils.core.setup(**attrs)
File "/private/var/folders/jp/j992by256v53v2qry6q5zd080000gn/T/pip-build-env-epqyex5v/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/private/var/folders/jp/j992by256v53v2qry6q5zd080000gn/T/pip-build-env-epqyex5v/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/private/var/folders/jp/j992by256v53v2qry6q5zd080000gn/T/pip-build-env-epqyex5v/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/private/var/folders/jp/j992by256v53v2qry6q5zd080000gn/T/pip-build-env-epqyex5v/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1244, in run_command
super().run_command(command)
File "/private/var/folders/jp/j992by256v53v2qry6q5zd080000gn/T/pip-build-env-epqyex5v/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/private/var/folders/jp/j992by256v53v2qry6q5zd080000gn/T/pip-build-env-epqyex5v/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 343, in run
self.run_command("build")
File "/private/var/folders/jp/j992by256v53v2qry6q5zd080000gn/T/pip-build-env-epqyex5v/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/private/var/folders/jp/j992by256v53v2qry6q5zd080000gn/T/pip-build-env-epqyex5v/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1244, in run_command
super().run_command(command)
File "/private/var/folders/jp/j992by256v53v2qry6q5zd080000gn/T/pip-build-env-epqyex5v/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/private/var/folders/jp/j992by256v53v2qry6q5zd080000gn/T/pip-build-env-epqyex5v/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 131, in run
self.run_command(cmd_name)
File "/private/var/folders/jp/j992by256v53v2qry6q5zd080000gn/T/pip-build-env-epqyex5v/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/private/var/folders/jp/j992by256v53v2qry6q5zd080000gn/T/pip-build-env-epqyex5v/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1244, in run_command
super().run_command(command)
File "/private/var/folders/jp/j992by256v53v2qry6q5zd080000gn/T/pip-build-env-epqyex5v/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "<string>", line 112, in run
File "<string>", line 127, in run_cmake
File "<string>", line 211, in build_extension_cmake
File "/Users/shinaelee/anaconda3/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/homebrew/bin/cmake', '/private/var/folders/jp/j992by256v53v2qry6q5zd080000gn/T/pip-install-671q9r0d/perspective-python_6132b12cc2814811b529c5e382b1b57b/dist', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/jp/j992by256v53v2qry6q5zd080000gn/T/pip-install-671q9r0d/perspective-python_6132b12cc2814811b529c5e382b1b57b/build/lib.macosx-10.9-x86_64-cpython-310/perspective/table', '-DCMAKE_BUILD_TYPE=Release', '-DPSP_CPP_BUILD=1', '-DPSP_WASM_BUILD=0', '-DPSP_PYTHON_BUILD=1', '-DPSP_PYTHON_VERSION=3.10', '-DPython_ADDITIONAL_VERSIONS=3.10', '-DPython_FIND_VERSION=3.10', '-DPython_EXECUTABLE=/Users/shinaelee/Compose/myvenv/myenv/bin/python', '-DPYTHON_LIBRARY=/Users/shinaelee/anaconda3/lib', '-DPYTHON_INCLUDE_DIR=/Users/shinaelee/anaconda3/include/python3.10', '-DPython_ROOT_DIR=/Users/shinaelee/Compose/myvenv/myenv', '-DPython_ROOT=/Users/shinaelee/Compose/myvenv/myenv', '-DPSP_CMAKE_MODULE_PATH=/private/var/folders/jp/j992by256v53v2qry6q5zd080000gn/T/pip-install-671q9r0d/perspective-python_6132b12cc2814811b529c5e382b1b57b/dist/cmake', '-DPSP_CPP_SRC=/private/var/folders/jp/j992by256v53v2qry6q5zd080000gn/T/pip-install-671q9r0d/perspective-python_6132b12cc2814811b529c5e382b1b57b/dist', '-DPSP_PYTHON_SRC=/private/var/folders/jp/j992by256v53v2qry6q5zd080000gn/T/pip-install-671q9r0d/perspective-python_6132b12cc2814811b529c5e382b1b57b/dist/../perspective', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for perspective-python
Failed to build perspective-python
ERROR: Could not build wheels for perspective-python, which is required to install pyproject.toml-based projects
'Tech > 파이썬' 카테고리의 다른 글
[Openpyxl] 엑셀파일 복구 (1) | 2022.08.27 |
---|---|
[pandas] read_csv 에서 인코딩 문제 발생 시 (0) | 2022.05.01 |
[파이썬 셀레니움] Timed out receiving message from renderer: 600.000 (0) | 2022.02.05 |
M1 맥북에서 셀레니움 실행 시 chromedrive 오류 해결 (0) | 2021.05.29 |
파이썬 명저 추천 (0) | 2020.09.05 |