Comments (9)
Hm, sounds odd but possible. I'll try to check this and report back.
from fbs.
Can we just print the error instead of halting?
try:
remove(path('${freeze_dir}/' + dll_name))
except FileNotFoundError as error:
print('Could not remove file:', error)
from fbs.
Could it be that there's no python3.dll
(but a python35.dll
) because you're using Anaconda?
from fbs.
Ok, I believe I found the root cause.
This conda install works just fine with fbs:
conda create -y -n fbs_py35 python=3.5 pyinstaller
activate fbs_py35
pip install PyQt5
pip install --no-cache-dir --force-reinstall -U fbs-0.0.6_SNAPSHOT-py3-none-any.whl
python -m fbs run
python -m fbs freeze
deactivate
This, however, produces the error where python3.dll
is not found:
conda create -y -n fbs_pyqt5_py35 python=3.5 pyinstaller pyqt
activate fbs_pyqt5_py35
pip install --no-cache-dir --force-reinstall -U fbs-0.0.6_SNAPSHOT-py3-none-any.whl
python -m fbs run
python -m fbs freeze
Traceback (most recent call last):
File "C:\Users\iruser\AppData\Local\conda\conda\envs\fbs_test\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\iruser\AppData\Local\conda\conda\envs\fbs_test\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\iruser\AppData\Local\conda\conda\envs\fbs_test\lib\site-packages\fbs\__main__.py", line 4, in <module>
main()
File "C:\Users\iruser\AppData\Local\conda\conda\envs\fbs_test\lib\site-packages\fbs\cmdline.py", line 17, in main
args.cmd()
File "C:\Users\iruser\AppData\Local\conda\conda\envs\fbs_test\lib\site-packages\fbs\builtin_commands.py", line 35, in freeze
freeze_windows()
File "C:\Users\iruser\AppData\Local\conda\conda\envs\fbs_test\lib\site-packages\fbs\freeze\windows.py", line 26, in freeze_windows
remove(path('${freeze_dir}/' + dll_name))
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\\Users\\iruser\\code\\repos\\fbs-tutorial\\target\\Tutorial\\python3.dll'
The difference between the two scenarios is that I'm pip-installing PyQt5 (Qt5.9) in first scenario and in the second scenario I'm installing the conda-distribution of PyQt5 (Qt5.6). The conda-distribution is what's causing the issue.
I'm closing this issue as there is clearly fbs incompatibility issues with the conda-forge distribution of PyQt5. I've found these so far:
- doesn't seem to be compiled with the
--standalone
argument, which means that the libraries are not found after pyinstaller has bundled everything up. - built against Qt 5.6
- for some reason causes this issue where
python3.dll
is missing from the target\Target folder
Please note that the conda-distribution of PySide2 works fine with fbs, although it is compiled against Qt 5.6. I spoke too soon on this one. It seems also the PySide2 conda distribution is exhibiting this issue, where python3.dll
is not found.
from fbs.
Interesting findings. Then the difference between Anaconda and vanilla Python is that the former has python35.dll
while the latter has python3.dll
. I could also imagine that there may be incompatibilities between PyQt 5.6 and PyInstaller 3.3+. Not sure.
from fbs.
Interesting findings. Then the difference between Anaconda and vanilla Python is that the former has python35.dll while the latter has python3.dll.
No, that's not what I compared. I compared two Anaconda installations. One with PyQt5.9 from pypi (no errors), and one with PyQt5.6 from conda-forge (could not find python3.dll
).
Perhaps PyQt5 dictates which DLL files to be fetched by PyInstaller and these two different PyQt5 distributions does it in different ways.
EDIT: Also, if you download the zip archive of vanilla Python, you'll see both the python35.dll
and the python3.dll
right there in the zip - so I don't think it's a matter of either having one or the other. And in my Conda installation, I also see both of them:
12/18/2017 07:53 AM 50,688 python3.dll
12/18/2017 07:53 AM 3,952,640 python35.dll
I could also imagine that there may be incompatibilities between PyQt 5.6 and PyInstaller 3.3+
Possible. Either way, pip-installing PyQt5.9 is the right way to do it!
from fbs.
I try Anaconda with fbs after upgrading PyQt5.11 from PyQt5.6, and freeze is working but with huge size (over 500MB).
So decide go back to vanilla Python3.6, cleaned the environment variables of Anaconda.
And i got the same issue "python3.dll not found":
raise LookupError("Could not find %s on PATH" % file_name) LookupError: Could not find python3.dll on PATH
I am still working on it:
- python3.dll exist both on vanilla and Anaconda PATH.
- freeze size still big(200MB), look like pandas, matplotlib and numpy are the problems.
- reinstall PyInstaller and PyQt, doesn't work
Maybe I should uninstall Anaconda and try again.
from fbs.
update- I figure it out.
fbs/fbs/freeze/windows.py
def _find_on_path(file_name):
path = os.environ.get("PATH", os.defpath)
path_items = path.split(os.pathsep)
if sys.platform == "win32":
if not os.curdir in path_items:
path_items.insert(0, os.curdir)
seen = set()
for dir_ in path_items:
normdir = os.path.normcase(dir_)
if not normdir in seen:
seen.add(normdir)
file_path = join(dir_, file_name)
if exists(file_path):
return file_path
raise LookupError("Could not find %s on PATH" % file_name)
I type os.environ.get
in my virtualenv, and find there is anaconda enviroment variables remains. So just move it and restart explorer.exe. Test again, it works fine.
from fbs.
Happy to hear it. I want to improve support for Anaconda in an upcoming release. Many people are using it.
from fbs.
Related Issues (20)
- UnicodeDecodeError: 'utf-8' codec can't decode byte 0xba in position 114: invalid start byte HOT 1
- Pro -- Updates beyond 1 year? HOT 2
- I want to use Sparkle Is that okay
- freeze on macOS Monterey gives warnings HOT 7
- Sentry exception events occurring in main thread are not flushed to Sentry (fbs Pro feature) HOT 3
- Double-clicking <AppName>.app does not launch application on macOS HOT 1
- fbs installer encoding issue + different error messages in and out of IDE
- Icons in src/main/icons are not carried over into the installation HOT 1
- PyInstaller >= 5.6 does not require `_fix_sparkle_delta_updates()` when freezing on MacOS HOT 2
- Issue with openpyxl library when running fbs freeze HOT 1
- FBS with Pyqt6 HOT 4
- "fbs freeze" does not work with the default program HOT 8
- When Running fbs release get cannot upload HOT 1
- FBS cannot find makensis even though it is installed HOT 2
- (Pro) No module named 'fbs_runtime.application_context' when running app that was released via buildvm/runvm HOT 6
- installer exe permission HOT 3
- fbs buildvm ubuntu command failing HOT 3
- QTabwidget Tab text area is white when selected, nothing can be seen HOT 3
- fbs pro experiencing problems with PySide2 (`no module named 'inspect'`) HOT 2
- how to build x86_64 and arm64 target on macos in Apple M1 chip
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fbs.