0

I am using matplotlib.pyplot in my python 3.5 script, when I convert my .py to .exe using Pyinstaller 3.2, I got this error:

FileNotFoundError: Path or glob "2100 10" not found or matches no files.

I ran into the same FileNotFoundError today when I tried to use PYINSTALLER to work with XLSXWRITER.

Can anyone help me to resolve this issue?

  • Can you give us any more information or code? It can't find "2100 10" but that doesn't mean a lot to us out of context of your code – The4thIceman Oct 23 '17 at 16:36
  • Here is my sample script: # Print the last item from year and pop year = [1940, 1960, 1980, 2000, 2020, 2040, 2060, 2080, 2100] pop = [2,3,4,5,6,7,8,9,10] print(year[-1]) print(pop[-1]) # Import matplotlib.pyplot as plt import matplotlib.pyplot as plt # Make a scatter plot: year on the x-axis, pop on the y-axis plt.scatter(year, pop) # Display the plot with plt.show() plt.xlabel("YEAR") plt.ylabel("POPULATION IN MILLIONS") plt.title("WORLD POPULATION PROJECTION") plt.show() – Wen-Shan Wendy Chow Oct 24 '17 at 05:30
  • I used PYINSTALLER to convert .py to .exe without MATPLOTLIB is fine. – Wen-Shan Wendy Chow Oct 24 '17 at 05:32
  • What is the full command you are using to compile with pyinstaller? Are there any warnings that are showing up when you run pyinstaller? – The4thIceman Oct 24 '17 at 08:57
  • I have installed Anaconda3 4.2 (64-bit) and the command I used after the Anaconda Prompt is>>> pyinstaller.exe --onefile --windowed --icon=app.ico mat_scatter.py. No warnings but the error message: "FileNotFoundError: Path or glob "2100 10" not found or matches no files." – Wen-Shan Wendy Chow Oct 24 '17 at 09:36
  • Dear The4thiceman, When I ran a different code using PYINSTALLER and XLSXWRITTER, I got warnings: WARNING: Removing import IPython.external.qt_loaders from module PyQt5.QtGui WARNING: Removing import IPython.external.qt_loaders from module PyQt5.QtWidgets WARNING: Removing import IPython.external.qt_loaders from module PyQt5.QtSvg WARNING: Removing import IPython.external.qt_loaders from module PyQt5 WARNING: Removing import IPython.external.qt_loaders from module INFO: Excluding import 'matplotlib' WARNING: Removing import IPython.core.pylabtools from module matplotlib – Wen-Shan Wendy Chow Oct 24 '17 at 15:53
  • Here is the code without importing MATPLOTLIB but XLSXWRITTER : # import os, xlsxwriter import pandas as pd cwd = os.getcwd() infile1_data = pd.read_excel("excel_infile 1.xlsx", sheetname=0) dataframe1 = pd.DataFrame(infile1_data) rows=dataframe1.shape[0] # find number of rows in dataframe print(dataframe1) infile2_data = pd.read_excel("excel_infile 2.xlsx", sheetname=0) dataframe2 = pd.DataFrame(infile2_data) i = 0 workbook = xlsxwriter.Workbook('consolidated.xlsx') worksheet = workbook.add_worksheet() worksheet.set_column('A:A', 20) ... workbook.close() – Wen-Shan Wendy Chow Oct 24 '17 at 15:59
  • # All requested packages already installed. # packages in environment at C:\Program Files\Anaconda3: # matplotlib 2.1.0 py35_0 conda-forge – Wen-Shan Wendy Chow Oct 24 '17 at 16:42
  • First of all, you need to put your code and other pertinent information into the question yourself, it is really hard to read in the comment section. Second, There seems to be issues with PyInstaller finding the proper stuff. I answered a similar question here: https://stackoverflow.com/questions/46858417/pyinstaller-runs-fine-but-exe-file-errors-no-module-named-failed-to-execute-sc/46894037#46894037. It has to do with missing modules. – The4thIceman Oct 25 '17 at 12:42
  • Other than that, I am not sure what is happening... – The4thIceman Oct 25 '17 at 12:42
  • Dear The4thIceman, I will follow your advise in the answers you provided earlier. It is a similar issue. Thanks!!! – Wen-Shan Wendy Chow Oct 26 '17 at 14:51

0 Answers0