저는 지난 몇 달 동안 python 3을 사용하여 프로그램을 작성했습니다. 나는 지금 당분간 그것을 테스트 해왔고 그것이해야하는 것처럼 작동하는 것 같다. 그래서 DSM/Synology (모델 : DS209 +, 버전 : DSM 4.2-3259)에서 실행 해 보려고했습니다. 슬프게도 나는이 환경에 대해 아무 것도 모른다. 그래서 Synology Package Center에서 python3 (3.3.2-0005)을 설치하고 작동 시켰습니다. 내 코드를 실행하면 작동합니다. 유일한 문제는 내 프로그램이 "요청"라이브러리를 사용한다는 것입니다. 그러나 나는 삐딱한 소리를 낼 수 없다. pip 설치를 위해 PuTTY에서 다음 줄을 사용하려고했습니다.DSM/Synology에 pip 설치하기
curl -k https://bootstrap.pypa.io/get-pip.py | python3
나는 pip를 다운로드하여 설치하고 요청 라이브러리를 얻으려고합니다. 그러나이 일이 내가 가지고 내가 뭘 잘못했는지 모르겠어요
The directory '/var/services/homes/admin/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/var/services/homes/admin/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pip
Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
100% |################################| 1.3MB 131kB/s
Collecting setuptools
Downloading setuptools-38.2.4-py2.py3-none-any.whl (489kB)
100% |################################| 491kB 305kB/s
Collecting wheel
Downloading wheel-0.30.0-py2.py3-none-any.whl (49kB)
100% |################################| 51kB 296kB/s
Installing collected packages: pip, setuptools, wheel
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.3/distutils/sysconfig.py", line 449, in _init_posix
with open(filename) as file:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/include/python3.3m/pyconfig.h'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/tmpdqp31o/pip.zip/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/tmp/tmpdqp31o/pip.zip/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/tmp/tmpdqp31o/pip.zip/pip/req/req_set.py", line 784, in install
**kwargs
File "/tmp/tmpdqp31o/pip.zip/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/tmp/tmpdqp31o/pip.zip/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/tmp/tmpdqp31o/pip.zip/pip/wheel.py", line 247, in move_wheel_files
prefix=prefix,
File "/tmp/tmpdqp31o/pip.zip/pip/locations.py", line 153, in distutils_scheme
i.finalize_options()
File "/usr/local/lib/python3.3/distutils/command/install.py", line 313, in finalize_options
(prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix')
File "/usr/local/lib/python3.3/distutils/sysconfig.py", line 531, in get_config_vars
func()
File "/usr/local/lib/python3.3/distutils/sysconfig.py", line 456, in _init_posix
raise DistutilsPlatformError(my_msg)
distutils.errors.DistutilsPlatformError: invalid Python installation: unable to open /usr/local/include/python3.3m/pyconfig.h (No such file or directory)
이 문제를 해결하는 것입니다 sudo는 -H를 사용하는 것 같다. 그러나 나는 그 일을 시작하는 방법을 모르고있다. 문제를 인터넷으로 검색하는 것이 도움이되지 않았습니다. 왜냐하면 내가 이해하기 너무 애매한 부분이나 이미 pip가 설치된이 문제가있는 부분을 발견했기 때문입니다. 이 질문이 너무 애매하지 않기를 바랍니다.
그래서 문제가 당신이 모르는있다 sudo 세션으로 변경하는 방법? admin으로 로그인하고 PuTTY 터미널에'sudo -i'를 입력하고 admin 암호를 입력 한 다음 설치 명령을 반복하십시오. – hoefling