Python Forum
How to include pandas with pyinstaller
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to include pandas with pyinstaller
#1
Hello,

I am trying to build an exe with pyinstaller I a getting aModuleNotFoundError no module named 'pandas'

I have tried the following so far:

pyinstaller --hidden-import=pandas --onefile someapp.py

>pyinstaller someapp.py --onefile --hidden-import pandas


What is the proper syntax?

Thanks
Reply
#2
(Feb-19-2020, 06:18 PM)Rickus Wrote: What is the proper syntax?
Pyinstaller will find pandas,so it's just.
pyinstaller --onefile pan_prog.py
Theyhave fixed error i got here and fixed here.

If want to look at my test with virtual environment,so none of my previous stuff interfere.
C:\code
λ python -m venv pand_env

C:\code
λ cd pand_env\

C:\code\pand_env
λ C:\code\pand_env\Scripts\activate

(pand_env) C:\code\pand_env
λ pip install pyinstaller pandas
Collecting pyinstaller
  Downloading .......
Successfully installed altgraph-0.17 future-0.18.2 numpy-1.18.1 pandas-1.0.1 pefile-2019.4.18
pyinstaller-3.6 python-dateutil-2.8.1 pytz-2019.3 pywin32-ctypes-0.2.0 six-1.14.0

(pand_env) C:\code\pand_env
λ pyinstaller --onefile pan.py
68 INFO: PyInstaller: 3.6
69 INFO: Python: 3.7.2
70 INFO: Platform: Windows-10-10.0.18362-SP0
.....
27754 INFO: Building EXE from EXE-00.toc completed successfully.

(pand_env) C:\code\pand_env
λ cd dist

(pand_env) C:\code\pand_env\dist
λ ls
pan.exe*

(pand_env) C:\code\pand_env\dist
λ pan
       date     day  line  o:points   o:team  points  season  site   team  \
0  20110911  Sunday   2.0        12  Falcons      30    2011  home  Bears
1  20110918  Sunday   6.0        30   Saints      13    2011  away  Bears

   total  week
0   40.5     1
1   47.0     2
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to include one script into another? MorningWave 8 304 Mar-21-2024, 10:34 PM
Last Post: MorningWave
  how include a python code in notpad++ plugin akbarza 2 578 Sep-25-2023, 08:25 PM
Last Post: deanhystad
  Regex Include and Exclude patterns in Same Expression starzar 2 733 May-23-2023, 09:12 AM
Last Post: Gribouillis
  How to include input as part of variable name Mark17 4 2,443 Oct-01-2021, 06:45 PM
Last Post: Mark17
  Can I include text using artist? tetrisbot 0 1,407 Aug-13-2020, 08:13 PM
Last Post: tetrisbot
  How to include Variable in File Path penahuse 3 7,215 Jan-05-2020, 03:08 AM
Last Post: ichabod801
  Cannot open include file: 'ft2build.h' thracian 0 4,766 Nov-11-2019, 09:08 PM
Last Post: thracian
  I need a query to select the numbers that include 2 digits of 3 omidvakili 1 1,611 Sep-20-2019, 03:49 PM
Last Post: Yoriz
  Trying to include an If statement in my While Loop junkankit 3 2,911 Jan-31-2019, 10:06 AM
Last Post: buran
  create dictionary from **kwargs that include tuple bluefrog 2 4,819 Oct-26-2016, 10:24 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