Python Forum
AttributeError: module 'platform' has no attribute 'python_implementation'
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AttributeError: module 'platform' has no attribute 'python_implementation'
#1
Can anyone help me figure this out?

All of a sudden python started running old code that I didn't even have open and now I can't even run...

import numpy as np
I get the following...
Error:
Traceback (most recent call last): File "c:\Users\david\googledrive\python\work\import_modules.py", line 1, in <module> import numpy as np File "C:\Users\david\anaconda3\lib\site-packages\numpy\__init__.py", line 142, in <module> from . import core File "C:\Users\david\anaconda3\lib\site-packages\numpy\core\__init__.py", line 107, in <module> from . import _internal File "C:\Users\david\anaconda3\lib\site-packages\numpy\core\_internal.py", line 11, in <module> import platform File "C:\Users\david\anaconda3\lib\platform.py", line 116, in <module> import sys, os, re, subprocess File "C:\Users\david\anaconda3\lib\subprocess.py", line 50, in <module> import signal File "c:\Users\david\googledrive\python\work\signal.py", line 5, in <module> import pandas as pd File "C:\Users\david\anaconda3\lib\site-packages\pandas\__init__.py", line 22, in <module> from pandas.compat.numpy import ( File "C:\Users\david\anaconda3\lib\site-packages\pandas\compat\__init__.py", line 17, in <module> PYPY = platform.python_implementation() == "PyPy" AttributeError: module 'platform' has no attribute 'python_implementation'
signal.py was some code I was running yesterday, which was the "old code" that would somehow run when running anything new today. Or rather I think it ran because a plot from that code would pop up when trying to run anything.

And it's weird that import pandas is there since it's not in the current script.

I thought it was my install so I uninstalled everything, python, vscode and anaconda and then reinstalled, but I still get the same issue.

I read something that made me think it had something to do with the installation of my modules / packages, but anaconda shows numpy, pandas, matplotlib and scipy as installed, these are the main 4 I import, aside from python_utils.

I'm sure the answer to this is out there, but I've searched as many forums as I can think of, but I must not have the right keywords or?

Thanks for taking a look at this for me!

David
Reply


Messages In This Thread
AttributeError: module 'platform' has no attribute 'python_implementation' - by davidpluseipi - Apr-24-2020, 06:30 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  getpass.getpass() results in AttributeError: module 'os' has no attribute 'O_NOCTTY' EarthAndMoon 4 792 Oct-03-2023, 02:00 PM
Last Post: deanhystad
  AttributeError: '_tkinter.tkapp' object has no attribute 'username' Konstantin23 4 1,768 Aug-04-2023, 12:41 PM
Last Post: Konstantin23
  Parallel processing - AttributeError: Can't get attribute 'sktimekmeans' Mohana1983 1 767 Jun-22-2023, 02:33 AM
Last Post: woooee
  Python: AttributeError: 'PageObject' object has no attribute 'extract_images' Melcu54 2 3,935 Jun-18-2023, 07:47 PM
Last Post: Melcu54
  cx_oracle Error - AttributeError: 'function' object has no attribute 'cursor' birajdarmm 1 2,402 Apr-15-2023, 05:17 PM
Last Post: deanhystad
  Pandas AttributeError: 'DataFrame' object has no attribute 'concat' Sameer33 5 5,696 Feb-17-2023, 06:01 PM
Last Post: Sameer33
  AttributeError: 'numpy.ndarray' object has no attribute 'load' hobbyist 8 7,145 Jul-06-2022, 10:55 AM
Last Post: deanhystad
  AttributeError: 'numpy.int32' object has no attribute 'split' rf_kartal 6 4,448 Jun-24-2022, 08:37 AM
Last Post: Anushka00
  AttributeError: 'list' object has no attribute 'upper' Anldra12 4 4,918 Apr-27-2022, 09:27 AM
Last Post: Anldra12
  AttributeError: 'function' object has no attribute 'metadata 3lnyn0 5 4,653 Mar-28-2022, 04:42 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020