Executable numpy error
Executable numpy error
I'm trying to create an executable file for my code. I've already tried with cx_Freeze and with pyinstaller. Both gives me the same error, which is:
"Missing required dependencies 0.format(missing_dependencies))"
PS C:UsersGustavoDesktopbuildexe.win32-3.6> python AgendaOficial.py
C:UsersGustavoAppDataLocalProgramsPythonPython36-32python.exe: can't open file 'AgendaOficial.py': [Errno 2] No such file or directory
PS C:UsersGustavoDesktopbuildexe.win32-3.6> .AgendaOficial.exe
Traceback (most recent call last):
File "C:UsersGustavoAppDataLocalProgramsPythonPython36-32libsite-packagescx_Freezeinitscripts__startup__.py", line 14, in run module.run()
File "C:UsersGustavoAppDataLocalProgramsPythonPython36-32libsite-packagescx_FreezeinitscriptsConsole.py", line 26, in run exec(code, m.dict)
File "AgendaOficial.py", line 8, in
File "C:UsersGustavoAppDataLocalProgramsPythonPython36-32libsite-packagespandas__init__.py", line 19, in
"Missing required dependencies 0".format(missing_dependencies))
ImportError: Missing required dependencies ['numpy']
PS C:UsersGustavoDesktopbuildexe.win32-3.6>
How can I fix that?
Code:
# -*- coding: UTF-8 -*-
from selenium import webdriver
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.select import Select
import time
import pandas as pd
import csv
import os
OPC1 = '1-São Paulo EXPO(Atualiza anualmente)'
OPC2 = '2-Expo Center Norte(Atualiza mensalmente)'
OPC3 = '3-PROMAGNO(Atualiza mensalmente)'
OPC4 = '4-Transameri(Atualiza mensalmente)'
OPC5 = '5-Anhembi(Atualiza mensalmente)'
show = OPC1 + 'n' + OPC2 + 'n' + OPC3 + 'n' + OPC4 + 'n' + OPC5
print(show)
input_exe = int(input('Escolha um numero para pesquisar: '))
user = input('Digite o path do seu User: ')
index_t = 0
if input_exe == 1:
path_folder = 'D:\Users\'+("0".format(user))+'\Desktop\EXPO\'
FOLDER = r'0'.format(path_folder)
print("Acessando:",path_folder)
arquivo_input = 'EXPO'
file = open(FOLDER + 'EXPO.csv','a', encoding = 'UTF-8')
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--incognito")
chrome_path = r"D:UsersgbenitesDesktopInovaçãoarquivos pyWebDriverchromedriver.exe"
driver = webdriver.Chrome(chrome_path, chrome_options=chrome_options)
url = 'http://www.saopauloexpo.com.br/pt/agenda-de-eventos/'
driver.get(url)
driver.maximize_window()
lista_eventos =
box_info = driver.find_elements_by_xpath('//*[@class="spg-data"]')
box_text_info = driver.find_elements_by_xpath('//span[@class="spg-post-meta"]//div')
time.sleep(3)
for data in range(len(box_info)):
get_info = box_info[data].get_attribute('innerText')
lista_eventos.append(get_info)
lista_eventos = [info.replace('n', '') for info in lista_eventos]
lista_eventos = [info.replace('t', '') for info in lista_eventos]
index_t+=1
print('Processando...(0 de 1)'.format(index_t,len(box_info)))
write = pd.DataFrame(lista_eventos)
write.to_csv(file,encoding = 'UTF-8-sig',index = False)
del lista_eventos[:]
print('Busca concluida!')
print('A informação ja esta no arquivo: 0.csv'.format(arquivo_input))
driver.close()
file2 = '01.csv'.format(path_folder,arquivo_input)
print('Abrindo o arquivo: 0.csv'.format(arquivo_input))
os.startfile(file2)
This is basically a part of my webscrapper to get data from all famous fairs in Brazil and put all data in an Excel file, so I'm trying to compile this .py as a executable to run in all PC's from my job, how can I do that? I've already tried to create the setup file to cx_Freeze and already tried to use pyinstaller too.
can you include the text in the image as text in the question? I can hardly read it :(
– Srini
4 hours ago
i know man, the problem's the executable close fast, i can't copy the text, all i got was that print
– Gustavo Molina
4 hours ago
but basically, it says in the end: ImportError: Missing required dependencies['numpy']
– Gustavo Molina
4 hours ago
Why not upload images of code on SO when asking a question?
– martineau
4 hours ago
The code it's pretty big, i think i would have to put much more text in it to put it, but i'll try
– Gustavo Molina
4 hours ago
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Same error here...
ReplyDeleteOpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 1024 current, 127506 max
OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 1024 current, 127506 max
OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 1024 current, 127506 max
OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 1024 current, 127506 max
Traceback (most recent call last):
File "NSEanalysis.py", line 2, in
import pandas as pd
File "/home/fzutljptf41p/.local/lib/python3.6/site-packages/pandas/__init__.py", line 19, in
"Missing required dependencies {0}".format(missing_dependencies))
ImportError: Missing required dependencies ['numpy']
Segmentation fault
Have tried to uninstall pandas and numpy. And reinstalled them.
ReplyDeleteI had the same issue, i had two python softwares(anaconda and pycharm) in my system. once i removed anaconda, and defined pycharm with interpreter "C:\Program Files\Python36\python.exe" then it started working fine.
ReplyDelete