前提・実現したいこと
Pythonでjupyterをインストールしたところ
赤字のエラーが起きたので解消したい
pipのアップグレードをすると
アップグレードがされないため
アップグレードして、古いバージョンをアンインストールしたい
発生している問題・エラーメッセージ
以下、jupyterのエラー ERROR: Error checking for conflicts. Traceback (most recent call last): File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3012, in _dep_map return self.__dep_map File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2806, in __getattr__ raise AttributeError(attr) AttributeError: _DistInfoDistribution__dep_map During handling of the above exception, another exception occurred: Traceback (most recent call last): File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3003, in _parsed_pkg_info return self._pkg_info File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2806, in __getattr__ raise AttributeError(attr) AttributeError: _pkg_info During handling of the above exception, another exception occurred: Traceback (most recent call last): File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\commands\install.py", line 524, in _warn_about_conflicts package_set, _dep_info = check_install_conflicts(to_install) File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\check.py", line 108, in check_install_conflicts package_set, _ = create_package_set_from_installed() File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\check.py", line 47, in create_package_set_from_installed package_set[name] = PackageDetails(dist.version, dist.requires()) File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2727, in requires dm = self._dep_map File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3014, in _dep_map self.__dep_map = self._compute_dependencies() File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3023, in _compute_dependencies for req in self._parsed_pkg_info.get_all('Requires-Dist') or []: File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3005, in _parsed_pkg_info metadata = self.get_metadata(self.PKG_INFO) File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1419, in get_metadata value = self._get(self._fn(self.egg_info, name)) File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1607, in _get with open(path, 'rb') as stream: FileNotFoundError: [Errno 2] No such file or directory: 'c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\scipy-1.3.0.dist-info\METADATA' 以下 pipのアップグレード時のエラー ERROR: Error checking for conflicts. Traceback (most recent call last): File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3012, in _dep_map return self.__dep_map File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2806, in __getattr__ raise AttributeError(attr) AttributeError: _DistInfoDistribution__dep_map During handling of the above exception, another exception occurred: Traceback (most recent call last): File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3003, in _parsed_pkg_info return self._pkg_info File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2806, in __getattr__ raise AttributeError(attr) AttributeError: _pkg_info During handling of the above exception, another exception occurred: Traceback (most recent call last): File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\commands\install.py", line 524, in _warn_about_conflicts package_set, _dep_info = check_install_conflicts(to_install) File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\check.py", line 108, in check_install_conflicts package_set, _ = create_package_set_from_installed() File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\check.py", line 47, in create_package_set_from_installed package_set[name] = PackageDetails(dist.version, dist.requires()) File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2727, in requires dm = self._dep_map File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3014, in _dep_map self.__dep_map = self._compute_dependencies() File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3023, in _compute_dependencies for req in self._parsed_pkg_info.get_all('Requires-Dist') or []: File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3005, in _parsed_pkg_info metadata = self.get_metadata(self.PKG_INFO) File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1419, in get_metadata value = self._get(self._fn(self.egg_info, name)) File "c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1607, in _get with open(path, 'rb') as stream: FileNotFoundError: [Errno 2] No such file or directory: 'c:\users\pc\appdata\local\programs\python\python37\lib\site-packages\scipy-1.3.0.dist-info\METADATA' ERROR: Could not install packages due to an EnvironmentError: [WinError 5] アクセスが拒否されました。: 'C:\Users\pc\AppData\Local\Temp\pip-uninstall-35eyp0u4\pip.exe' Consider using the `--user` option or check the permissions.
該当のソースコード
pip install jupyter pip install --upgrade pip
試したこと
Traceback (most recent call last)が
Pythonのエラーでも例外という意味
line 数字 が行数を示しており
この箇所にエラーの原因がある
attribute なので属性に関するエラーということ
pipのバージョンが古い19.1.1ということなので
21.1.2にしろという表記があった
が、アップグレードされず、19.1.1のまま
補足情報(FW/ツールのバージョンなど)
pip 19.1.1
Windows10
Python 3.7
エディタ
コマンドプロンプト