簡體   English   中英

帶有Anaconda 3的Pyinstaller無法安裝

[英]Pyinstaller with Anaconda 3 can't install

我正在嘗試在Anaconda 3環境中使用pyinstaller編譯exe。 任何想法如何解決此問題:

201 INFO: PyInstaller: 3.3.1
201 INFO: Python: 3.6.6
202 INFO: Platform: Linux-2.6.32-754.3.5.el6.x86_64-x86_64-with-centos-6.10-Final
........ SOME BLOAT.....
8666 INFO: Python library not in binary dependencies. Doing additional     searching...
Traceback (most recent call last):
  File "/home/rokner/miniconda3/envs/bisection/bin/pyinstaller", line 6, in     <module>
    ...BIG TRACEBACK ...
  File "/home/rokner/miniconda3/envs/bisection/lib/python3.6/site-    packages/PyInstaller/building/build_main.py", line 629, in _check_python_library
    raise IOError(msg)
OSError: Python library not found: libpython3.6.so.1.0,     libpython3.6mu.so.1.0, libpython3.6m.so.1.0
This would mean your Python installation doesn't come with proper library     files.
This usually happens by missing development package, or unsuitable build     parameters of Python installation.

* On Debian/Ubuntu, you would need to install Python development packages
  * apt-get install python3-dev
  * apt-get install python-dev
* If you're building Python by yourself, please rebuild your Python with `--    enable-shared` (or, `--enable-framework` on Darwin)

我已經嘗試為我的操作系統(Cent OS 6.10)安裝一些開發包,但是沒有運氣,因為使用的python在conda env中。

如錯誤提示所示, 找不到Python庫。

為了找出這個錯誤,我編輯.bashrc並將Anaconda的python庫lib設置為LD_LIBRARY_PATH

export LD_LIBRARY_PATH=/usr/local/anaconda3/lib:$LD_LIBRARY_PATH

然后,PyInstaller運行良好。

PS:我使用Python3.6.8,PyInstaller3.4開發了CentOS 6.5。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM