반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Tags
- Kopf
- seldon core
- 오퍼레이터
- mlops
- Pulumi
- operator
- Litmus
- kubernetes operator
- tekton
- eBPF
- CANARY
- opentelemetry
- Argo
- knative
- nginx ingress
- Model Serving
- gitops
- Continuous Deployment
- keda
- opensearch
- blue/green
- Kubernetes
- argocd
- 카오스 엔지니어링
- MLflow
- CI/CD
- xdp
- Kubernetes 인증
- Kubeflow
- serving
Archives
- Today
- Total
Kubernetes 이야기
Ubuntu에서 pipenv 실행 시 FileNotFoundError 오류 본문
반응형
Ubuntu 22.04에서 pipenv로 venv 생성 시 아래의 오류가 발생함.
# pipenv --python 3.11
Creating a virtualenv for this project...
Pipfile: /root/kopf/Pipfile
Using /bin/python (3.11.1) to create virtualenv...
⠹ Creating virtual environment...created virtual environment CPython3.11.1.final.0-64 in 179ms
creator CPython3Posix(dest=/root/.local/share/virtualenvs/kopf-cdlYO4Rx, clear=False, global=False)
seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, pkg_resources=latest, via=copy, app_data_dir=/root/.local/share/virtualenv/seed-app-data/v1.0.1.debian.1)
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
✔ Successfully created virtual environment!
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 8, in <module>
sys.exit(cli())
^^^^^
File "/usr/local/lib/python3.11/dist-packages/pipenv/vendor/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pipenv/cli/options.py", line 57, in main
return super().main(*args, **kwargs, windows_expand_args=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pipenv/vendor/click/core.py", line 1053, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pipenv/vendor/click/core.py", line 1637, in invoke
super().invoke(ctx)
File "/usr/local/lib/python3.11/dist-packages/pipenv/vendor/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pipenv/vendor/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pipenv/vendor/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pipenv/vendor/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pipenv/vendor/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pipenv/cli/command.py", line 210, in cli
ensure_project(
File "/usr/local/lib/python3.11/dist-packages/pipenv/core.py", line 541, in ensure_project
ensure_virtualenv(
File "/usr/local/lib/python3.11/dist-packages/pipenv/core.py", line 474, in ensure_virtualenv
do_create_virtualenv(
File "/usr/local/lib/python3.11/dist-packages/pipenv/core.py", line 1060, in do_create_virtualenv
project._environment = Environment(
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pipenv/environment.py", line 79, in __init__
self._base_paths = self.get_paths()
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pipenv/environment.py", line 383, in get_paths
c = subprocess_run(command)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pipenv/utils/processes.py", line 75, in subprocess_run
return subprocess.run(
^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/subprocess.py", line 548, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/subprocess.py", line 1024, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.11/subprocess.py", line 1901, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/root/.local/share/virtualenvs/kopf-cdlYO4Rx/bin/python'
[원인]
python 디렉토리가 ~/.../local/bin/python 이어야 하는데 ~/.../bin/python으로 나타남.
[해결]
OS 별로 다르다는 이야기가 있는데 다음과 같이 해결함.
pip install virtualenv --upgrade^C
참고
https://github.com/pypa/pipenv/issues/5101
https://github.com/pypa/pipenv/issues/5109
반응형
'개발 > python' 카테고리의 다른 글
Kopf ( 예제 ) (1) | 2023.02.05 |
---|---|
Kopf (소개) (0) | 2023.02.03 |
Loguru (0) | 2023.01.24 |
Fastapi 모범 사례 (0) | 2023.01.22 |
fastapi 개발 환경 구성 (0) | 2023.01.22 |
Comments