Making .exe from the Python Script that uses GIS libraries such as geopandas, folium
It's a very straightforward and broad question I know but I have very little time so I have to ask. I created an interface to do some GIS calculations and for that I used below libraries in backend.
import osmnx as ox, networkx as nx, geopandas as gpd, pandas as pd
from shapely.geometry import LineString, Point
from fiona.crs import from_epsg
import branca.colormap as cm
import folium
from folium.plugins import MarkerCluster
import pysal as ps
and these for frontend
import tkinter as tk
from tkinter import ttk
from tkinter.filedialog import askopenfilename, asksaveasfilename,
askdirectory
import backend as bk
I'm trying to make it an executable program and I've tried PyInstaller but it did not work because of the dependencies. Is there any way to do it with PyInstaller? or any other libraries? Or what should I do?
p.s : I'm using python 3.6
Thanks in advance!
python-3.x executable pyinstaller
add a comment |
It's a very straightforward and broad question I know but I have very little time so I have to ask. I created an interface to do some GIS calculations and for that I used below libraries in backend.
import osmnx as ox, networkx as nx, geopandas as gpd, pandas as pd
from shapely.geometry import LineString, Point
from fiona.crs import from_epsg
import branca.colormap as cm
import folium
from folium.plugins import MarkerCluster
import pysal as ps
and these for frontend
import tkinter as tk
from tkinter import ttk
from tkinter.filedialog import askopenfilename, asksaveasfilename,
askdirectory
import backend as bk
I'm trying to make it an executable program and I've tried PyInstaller but it did not work because of the dependencies. Is there any way to do it with PyInstaller? or any other libraries? Or what should I do?
p.s : I'm using python 3.6
Thanks in advance!
python-3.x executable pyinstaller
add a comment |
It's a very straightforward and broad question I know but I have very little time so I have to ask. I created an interface to do some GIS calculations and for that I used below libraries in backend.
import osmnx as ox, networkx as nx, geopandas as gpd, pandas as pd
from shapely.geometry import LineString, Point
from fiona.crs import from_epsg
import branca.colormap as cm
import folium
from folium.plugins import MarkerCluster
import pysal as ps
and these for frontend
import tkinter as tk
from tkinter import ttk
from tkinter.filedialog import askopenfilename, asksaveasfilename,
askdirectory
import backend as bk
I'm trying to make it an executable program and I've tried PyInstaller but it did not work because of the dependencies. Is there any way to do it with PyInstaller? or any other libraries? Or what should I do?
p.s : I'm using python 3.6
Thanks in advance!
python-3.x executable pyinstaller
It's a very straightforward and broad question I know but I have very little time so I have to ask. I created an interface to do some GIS calculations and for that I used below libraries in backend.
import osmnx as ox, networkx as nx, geopandas as gpd, pandas as pd
from shapely.geometry import LineString, Point
from fiona.crs import from_epsg
import branca.colormap as cm
import folium
from folium.plugins import MarkerCluster
import pysal as ps
and these for frontend
import tkinter as tk
from tkinter import ttk
from tkinter.filedialog import askopenfilename, asksaveasfilename,
askdirectory
import backend as bk
I'm trying to make it an executable program and I've tried PyInstaller but it did not work because of the dependencies. Is there any way to do it with PyInstaller? or any other libraries? Or what should I do?
p.s : I'm using python 3.6
Thanks in advance!
python-3.x executable pyinstaller
python-3.x executable pyinstaller
asked Jan 17 at 7:33
omraknomrakn
184
184
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
As far as another library is concerned: you can use cx_Freeze
to make an executable out of your Python program.
You can install cx_Freeze
by issuing the command
python -m pip install cx_Freeze --upgrade
in a terminal or command prompt. You'll find links to the cx_Freeze
documentation and source code on the cx_Freeze
entry page.
To create an executable, you need to create a setup script setup.py
for your application an then issue the command
python setup.py build
You can find a working example using tkinter
in this question
tkinter program compiles with cx_Freeze but program will not launch
and its accepted answer. It also contains useful links.
In order to use pandas
in your main script, you'll need to modify the setup.py
script of the example linked above by adding
packages = ['numpy']
and replacing the options
argument in the setup
call by
options={'build_exe': {'include_files': include_files, 'packages': packages}}
You also might need further tweaking for the other modules you are using (geopandas
, folium
, ...). If it does not work with the example described above, please edit your question and add the setup.py
script you are using and the error message reported to get further help.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54231010%2fmaking-exe-from-the-python-script-that-uses-gis-libraries-such-as-geopandas-fo%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
As far as another library is concerned: you can use cx_Freeze
to make an executable out of your Python program.
You can install cx_Freeze
by issuing the command
python -m pip install cx_Freeze --upgrade
in a terminal or command prompt. You'll find links to the cx_Freeze
documentation and source code on the cx_Freeze
entry page.
To create an executable, you need to create a setup script setup.py
for your application an then issue the command
python setup.py build
You can find a working example using tkinter
in this question
tkinter program compiles with cx_Freeze but program will not launch
and its accepted answer. It also contains useful links.
In order to use pandas
in your main script, you'll need to modify the setup.py
script of the example linked above by adding
packages = ['numpy']
and replacing the options
argument in the setup
call by
options={'build_exe': {'include_files': include_files, 'packages': packages}}
You also might need further tweaking for the other modules you are using (geopandas
, folium
, ...). If it does not work with the example described above, please edit your question and add the setup.py
script you are using and the error message reported to get further help.
add a comment |
As far as another library is concerned: you can use cx_Freeze
to make an executable out of your Python program.
You can install cx_Freeze
by issuing the command
python -m pip install cx_Freeze --upgrade
in a terminal or command prompt. You'll find links to the cx_Freeze
documentation and source code on the cx_Freeze
entry page.
To create an executable, you need to create a setup script setup.py
for your application an then issue the command
python setup.py build
You can find a working example using tkinter
in this question
tkinter program compiles with cx_Freeze but program will not launch
and its accepted answer. It also contains useful links.
In order to use pandas
in your main script, you'll need to modify the setup.py
script of the example linked above by adding
packages = ['numpy']
and replacing the options
argument in the setup
call by
options={'build_exe': {'include_files': include_files, 'packages': packages}}
You also might need further tweaking for the other modules you are using (geopandas
, folium
, ...). If it does not work with the example described above, please edit your question and add the setup.py
script you are using and the error message reported to get further help.
add a comment |
As far as another library is concerned: you can use cx_Freeze
to make an executable out of your Python program.
You can install cx_Freeze
by issuing the command
python -m pip install cx_Freeze --upgrade
in a terminal or command prompt. You'll find links to the cx_Freeze
documentation and source code on the cx_Freeze
entry page.
To create an executable, you need to create a setup script setup.py
for your application an then issue the command
python setup.py build
You can find a working example using tkinter
in this question
tkinter program compiles with cx_Freeze but program will not launch
and its accepted answer. It also contains useful links.
In order to use pandas
in your main script, you'll need to modify the setup.py
script of the example linked above by adding
packages = ['numpy']
and replacing the options
argument in the setup
call by
options={'build_exe': {'include_files': include_files, 'packages': packages}}
You also might need further tweaking for the other modules you are using (geopandas
, folium
, ...). If it does not work with the example described above, please edit your question and add the setup.py
script you are using and the error message reported to get further help.
As far as another library is concerned: you can use cx_Freeze
to make an executable out of your Python program.
You can install cx_Freeze
by issuing the command
python -m pip install cx_Freeze --upgrade
in a terminal or command prompt. You'll find links to the cx_Freeze
documentation and source code on the cx_Freeze
entry page.
To create an executable, you need to create a setup script setup.py
for your application an then issue the command
python setup.py build
You can find a working example using tkinter
in this question
tkinter program compiles with cx_Freeze but program will not launch
and its accepted answer. It also contains useful links.
In order to use pandas
in your main script, you'll need to modify the setup.py
script of the example linked above by adding
packages = ['numpy']
and replacing the options
argument in the setup
call by
options={'build_exe': {'include_files': include_files, 'packages': packages}}
You also might need further tweaking for the other modules you are using (geopandas
, folium
, ...). If it does not work with the example described above, please edit your question and add the setup.py
script you are using and the error message reported to get further help.
edited 2 days ago
answered 2 days ago
jpegjpeg
6581318
6581318
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54231010%2fmaking-exe-from-the-python-script-that-uses-gis-libraries-such-as-geopandas-fo%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown