import pandas as p
产生
Traceback (most recent call last):
File "pandas_practice.py", line 1, in <module>
import pandas as p
File "/home/hellrider/.local/lib/python2.7/site-packages/pandas/__init__.py", line 13, in <module>
__import__(dependency)
File "/home/hellrider/.local/lib/python2.7/site-packages/numpy/__init__.py", line 142, in <module>
from . import add_newdocs
File "/home/hellrider/.local/lib/python2.7/site-packages/numpy/add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "/home/hellrider/.local/lib/python2.7/site-packages/numpy/lib/__init__.py", line 8, in <module>
from .type_check import *
File "/home/hellrider/.local/lib/python2.7/site-packages/numpy/lib/type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "/home/hellrider/.local/lib/python2.7/site-packages/numpy/core/__init__.py", line 38, in <module>
from . import numeric
File "/home/hellrider/.local/lib/python2.7/site-packages/numpy/core/numeric.py", line 1820, in <module>
from .arrayprint import array2string, get_printoptions, set_printoptions
File "/home/hellrider/.local/lib/python2.7/site-packages/numpy/core/arrayprint.py", line 19, in <module>
import functools
File "/home/hellrider/Desktop/python-related/Some Scribbled Shit/functools.py", line 7, in <module>
server_log = functools.partial(log, subsystem='server')
AttributeError: 'module' object has no attribute 'partial'
在这里帮助我......请
答案 0 :(得分:0)
您应该尝试在与functools.py相同的级别创建__init__.py
/ home / hellrider / Desktop / python-related / Some Scribbled Shit / functools.py
您是否确认functools具有&#34; partial&#34;功能