pip install pods command failed in jupyter with FileNotFoundError: [Errno 2] No such file or directory: 'C:\\tmp\\sods.log'
pip install pods command failed in jupyter with FileNotFoundError: [Errno 2] No such file or directory: 'C:\\tmp\\sods.log'
我尝试使用以下命令在 jupyter notebook 中安装 pods 包:
pip install pods
import pods
安装失败,出现以下错误
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
<ipython-input-3-c6cba4dfa9c3> in <module>
1 get_ipython().run_line_magic('matplotlib', 'inline')
----> 2 import pods
3 import matplotlib.pyplot as plt
~\anaconda3\lib\site-packages\pods\__init__.py in <module>
----> 1 from . import datasets
2 from . import mocap
~\anaconda3\lib\site-packages\pods\datasets.py in <module>
17 import logging
18
---> 19 logging.basicConfig(
20 level=logging.DEBUG,
21 format="%(asctime)s %(levelname)s %(message)s",
~\anaconda3\lib\logging\__init__.py in basicConfig(**kwargs)
1974 mode = kwargs.pop("filemode", 'a')
1975 if filename:
-> 1976 h = FileHandler(filename, mode)
1977 else:
1978 stream = kwargs.pop("stream", None)
~\anaconda3\lib\logging\__init__.py in __init__(self, filename, mode, encoding, delay)
1141 self.stream = None
1142 else:
-> 1143 StreamHandler.__init__(self, self._open())
1144
1145 def close(self):
~\anaconda3\lib\logging\__init__.py in _open(self)
1170 Return the resulting stream.
1171 """
-> 1172 return open(self.baseFilename, self.mode, encoding=self.encoding)
1173
1174 def emit(self, record):
FileNotFoundError: [Errno 2] No such file or directory: 'C:\tmp\sods.log'
我尝试使用 ! pip install pods --user
命令安装 pods 软件包,但问题仍然相同。谁能提供您解决问题的见解?
问题是日志文件的路径在源代码中是硬编码的,如 github 中所示。然而,路径 C:\tmp
在 windows.
中默认不存在
最简单的解决办法就是在 C 盘上创建一个 tmp 文件夹
我尝试使用以下命令在 jupyter notebook 中安装 pods 包:
pip install pods
import pods
安装失败,出现以下错误
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
<ipython-input-3-c6cba4dfa9c3> in <module>
1 get_ipython().run_line_magic('matplotlib', 'inline')
----> 2 import pods
3 import matplotlib.pyplot as plt
~\anaconda3\lib\site-packages\pods\__init__.py in <module>
----> 1 from . import datasets
2 from . import mocap
~\anaconda3\lib\site-packages\pods\datasets.py in <module>
17 import logging
18
---> 19 logging.basicConfig(
20 level=logging.DEBUG,
21 format="%(asctime)s %(levelname)s %(message)s",
~\anaconda3\lib\logging\__init__.py in basicConfig(**kwargs)
1974 mode = kwargs.pop("filemode", 'a')
1975 if filename:
-> 1976 h = FileHandler(filename, mode)
1977 else:
1978 stream = kwargs.pop("stream", None)
~\anaconda3\lib\logging\__init__.py in __init__(self, filename, mode, encoding, delay)
1141 self.stream = None
1142 else:
-> 1143 StreamHandler.__init__(self, self._open())
1144
1145 def close(self):
~\anaconda3\lib\logging\__init__.py in _open(self)
1170 Return the resulting stream.
1171 """
-> 1172 return open(self.baseFilename, self.mode, encoding=self.encoding)
1173
1174 def emit(self, record):
FileNotFoundError: [Errno 2] No such file or directory: 'C:\tmp\sods.log'
我尝试使用 ! pip install pods --user
命令安装 pods 软件包,但问题仍然相同。谁能提供您解决问题的见解?
问题是日志文件的路径在源代码中是硬编码的,如 github 中所示。然而,路径 C:\tmp
在 windows.
最简单的解决办法就是在 C 盘上创建一个 tmp 文件夹