Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't import pandas
#1
I'm trying to import pandas (after installing it through many different methods) and I'm seeing this error,

C:\\Users\\jcooper>python

Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) \[MSC v.1924 64 bit (AMD64)\] on win32

Type "help", "copyright", "credits" or "license" for more information.

\>>> import pandas as pd

Traceback (most recent call last):

File "<stdin>", line 1, in <module>

File "C:\\Users\\jcooper\\AppData\\Local\\Programs\\Python\\Python38\\lib\\site-packages\\pandas\\\_\_init\_\_.py", line 11, in <module>

\_\_import\_\_(dependency)

File "C:\\Users\\jcooper\\AppData\\Roaming\\Python\\Python38\\site-packages\\numpy\\\_\_init\_\_.py", line 138, in <module>

from . import \_distributor\_init

File "C:\\Users\\jcooper\\AppData\\Roaming\\Python\\Python38\\site-packages\\numpy\\\_distributor\_init.py", line 26, in <module>

WinDLL(os.path.abspath(filename))

File "C:\\Users\\jcooper\\AppData\\Local\\Programs\\Python\\Python38\\lib\\ctypes\\\_\_init\_\_.py", line 373, in \_\_init\_\_

self.\_handle = \_dlopen(self.\_name, mode)

OSError: \[WinError 193\] %1 is not a valid Win32 application

I've tried researching this a bit before posting - I think maybe because I recently switched Python to a 64 bit from 32, the virtual environment is screwed up but I'm not certain of this and if it's accurate I'm unsure of how to fix it.

I've uninstalled and reinstalled Python a couple times now, deleted all the files associated with the previous installation, installed pandas on it's own and through anaconda. Nothing seems to resolve teh OSError: \[WinError 193\] issue.

Hopefully this is the page to be posting this on - new to Python. Any actionable help would be greatly appreciated.
Reply
#2
please post code as one contiguous block, followed by error trace back, complete and unaltered
please place both in bbcode blocks, see: bbcode
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  can not import anaconda pandas module. PySpark pandas module is imported!! aupres 0 768 Aug-06-2023, 01:09 AM
Last Post: aupres
  Plot a pandas data fram via pyqtgraph with an modul import and qt designer widget Nietzsche 0 893 May-29-2023, 02:42 PM
Last Post: Nietzsche
  Illegal instruction (core dumped) when import pandas. amandacstr 1 2,209 Dec-31-2022, 11:31 PM
Last Post: stevendaprano
  help on pandas circular import jip31 2 8,686 May-18-2021, 11:54 AM
Last Post: jip31
  CSV import by Pandas maryam88 3 4,337 May-17-2020, 07:33 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

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