Python Forum
AttributeError: module 'platform' has no attribute 'python_implementation' - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: AttributeError: module 'platform' has no attribute 'python_implementation' (/thread-26236.html)



AttributeError: module 'platform' has no attribute 'python_implementation' - davidpluseipi - Apr-24-2020

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


RE: AttributeError: module 'platform' has no attribute 'python_implementation' - Larz60+ - Apr-24-2020

please show command you used to run app


RE: AttributeError: module 'platform' has no attribute 'python_implementation' - davidpluseipi - May-01-2020

To write and run python, I...
(on my windows 10 machine)
1) open Anaconda
2) Launch VSCode from within Anaconda
3) Open folder
4) open import_modules.py
5) click on the run button (often I just press Ctrl+Alt+n)

Is that what you're looking for?


RE: AttributeError: module 'platform' has no attribute 'python_implementation' - Larz60+ - May-01-2020

Quote:Is that what you're looking for?
i guess so, the error is on pandas, what I really wanted, but didn't ask for is the code.
Quote:And it's weird that import pandas is there since it's not in the current script.
hard to see what's wrong without the code.