2017-10-18 2 views
0
import pandas as p 

'partielle' produit:Importation donne un objet Pandas 'module' AttributeError n'a pas d'attribut

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' 

Aidez-moi ... pls

+2

Vous pouvez essayer de mettre à jour les pandas. Si vous avez utilisé Anaconda alors tapez conda update pandas – BenT

+0

non je n'utilise pas anaconda –

+0

Vous avez appelé votre propre script 'functools.py'? Il semble donc de la traceback. Renommez le script. – roganjosh

Répondre

0

Vous devriez essayer en créant un __init__. py dans le même niveau que functools.py

/home/Hellrider/Desktop/python liés/Certains Scribbled Merde/functools.py

Avez-vous vérifié que functools a la fonction "partial"?