ModuleNotFoundError for Pandas Private Module
See original GitHub issueI try to use Nuitka to compile this script. The compilation is successful and a .bin
file is generated. But upon execution, it raises ModuleNotFoundError: No module named 'pandas._config.localization
import time
import pandas as pd
SLEEP_SEC = 5
while True:
now = pd.Timestamp.utcnow()
print(f"{now=}")
print(f"Sleep for {SLEEP_SEC} seconds")
time.sleep(SLEEP_SEC)
Nuitka version
I tried the latest stable release (1.0.6
) before, but the same error occurs. So, I switch to the latest pre-release version 1.1rc7
python -m nuitka --version
1.1rc7
Commercial: None
Python: 3.9.12 (main, Jun 1 2022, 06:36:29)
Flavor: Anaconda Python
Executable: /opt/miniconda3/envs/secure-python/bin/python
OS: Darwin
Arch: x86_64
Installation of Python and Nuitka and Python packages
conda create -n nuitka-tutorial python=3.9 -y
conda activate nuitka-tutorial
pip install -U "https://github.com/Nuitka/Nuitka/archive/develop.zip"
pip install numpy==1.23.2
pip install pandas==1.4.3
The specific PyPI names and versions
python -m pip freeze
anyio==3.6.1
certifi @ file:///private/var/folders/sy/f16zz6x50xz3113nwtb9bvq00000gp/T/abs_83242e7e-f82d-4a71-8ef2-9d71d212d249gu_wxmeq/croots/recipe/certifi_1655968827803/work/certifi
charset-normalizer==2.1.1
h11==0.12.0
httpcore==0.15.0
idna==3.3
Nuitka @ https://github.com/Nuitka/Nuitka/archive/develop.zip
numpy==1.23.2
pandas==1.4.3
python-dateutil==2.8.2
pytz==2022.2.1
rfc3986==1.5.0
six==1.16.0
sniffio==1.2.0
typing_extensions==4.3.0
urllib3==1.26.12
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
ImportError: No module named pandas - Stack Overflow
It turns out the problem happens when you're installing Pandas to a version of python and trying to run the program using another...
Read more >[Fixed] ModuleNotFoundError: No module named 'pandas'
How to Fix “ModuleNotFoundError: No module named 'pandas'” in PyCharm · Open File > Settings > Project from the PyCharm menu. · Select...
Read more >Troubleshoot No module named Pandas errors in Python
Troubleshoot pandas modulenotfounderror on MiniConda or Anaconda · Hit the Windows button or magnifying glass icon (alternatively, hit the Windows key + S)....
Read more >How to Fix: No module named pandas - GeeksforGeeks
The error “No module named pandas ” will occur when there is no pandas library in your environment IE the pandas module is...
Read more >modulenotfounderror no module named 'pandas' - YouTube
pandas # python In this video, we will resolve the error ' ModuleNotFoundError ' from the command prompt in Windows machine.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The accelerated mode using mixed code still needs to be enhanced, but I didn’t find the time for the issue yet. Most people affected are using the wrong mode anyway.
The original report seems to not be using standalone mode, which I have to infer from the
.bin
suffix, however it’s unclear what was included, and what was not, making this a very bad report. And the me toos, while providing some information didn’t add to it. Nuitka is not good at partially compiling modules in accelerated mode, like pandas and then to have some extension modules mixed in. Can you confirm of deny using --standalone mode here?