【pip】xlsx2csvインストール時に出力されたエラー

プログラミング
Mediamodifier / Pixabay
この記事は約5分で読めます。

インストールした時にめっちゃエラー出てきて焦りましたが、結論pythonのバージョンが3でしか対応していないことが問題でした。

pipでインストールしようとしたのでエラー

shimizuMacBook-puro:~ shimizu$ pip install xlsx2csv  
 DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
 Collecting xlsx2csv
   Using cached https://files.pythonhosted.org/packages/21/99/c5ecdf97d9126db73a3f95989a33dee5e80c85e5d2388b6d8e4b666291f8/xlsx2csv-0.7.6.tar.gz
 Installing collected packages: xlsx2csv
   Running setup.py install for xlsx2csv ... error
     Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/jq/l5cgt4494ks4ldfw30xxt1hr0000gn/T/pip-install-iBkCQg/xlsx2csv/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/jq/l5cgt4494ks4ldfw30xxt1hr0000gn/T/pip-record-m7fo2A/install-record.txt --single-version-externally-managed --compile:
     running install
     running build
     running build_py
     creating build
     creating build/lib
     copying xlsx2csv.py -> build/lib
    running build_scripts
    creating build/scripts-2.7
    copying and adjusting scripts/xlsx2csv -> build/scripts-2.7
    changing mode of build/scripts-2.7/xlsx2csv from 644 to 755
    running install_lib
    copying build/lib/xlsx2csv.py -> /Library/Python/2.7/site-packages
    error: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/xlsx2csv.py'
    
    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/jq/l5cgt4494ks4ldfw30xxt1hr0000gn/T/pip-install-iBkCQg/xlsx2csv/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/jq/l5cgt4494ks4ldfw30xxt1hr0000gn/T/pip-record-m7fo2A/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/jq/l5cgt4494ks4ldfw30xxt1hr0000gn/T/pip-install-iBkCQg/xlsx2csv/

pip3でインストールしたので正常にインストール完了

shimizunoMacBook-puro:~ .shimizu$ pip3 install xlsx2csv  
Collecting xlsx2csv
  Using cached https://files.pythonhosted.org/packages/21/99/c5ecdf97d9126db73a3f95989a33dee5e80c85e5d2388b6d8e4b666291f8/xlsx2csv-0.7.6.tar.gz
Building wheels for collected packages: xlsx2csv
  Building wheel for xlsx2csv (setup.py) ... done
  Stored in directory: /Users/.shimizu/Library/Caches/pip/wheels/90/78/ce/7b090667c4d5dc8ba97c074b15444b94d20522f22f364d8b68
Successfully built xlsx2csv
Installing collected packages: xlsx2csv
Successfully installed xlsx2csv-0.7.6

コメント

タイトルとURLをコピーしました