Python Forum
PyInstaller on Mac ... does not work easily?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PyInstaller on Mac ... does not work easily?
#4
Interestingly! I have a problem with get a version of pip, have a look at the output when I type $pip -V

MU234s-iMac:~ mu234$ python -V
Python 3.9.0

MU234s-iMac:~ mu234$ pip -V
Traceback (most recent call last):
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/Users/mu234/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 3251, in <module>
@_call_aside
File "/Users/mu234/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside
f(*args, **kwargs)
File "/Users/mu234/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/Users/mu234/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 583, in _build_master
ws.require(__requires__)
File "/Users/mu234/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/Users/mu234/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pip==20.2.4' distribution was not found and is required by the application
MU234s-iMac:~ mu234$

I guess I have to reinstall the pip...

(Nov-20-2020, 10:21 AM)mu234 Wrote: python 3.9

will have a look at what you are saying ... thanks!

(Nov-19-2020, 03:06 PM)snippsat Wrote: What version of Python are you running,the path look a little strange.
Look at The right and wrong way to set Python 3 as default on a Mac
So recently pyinstaller is now also updated for Python 3.9.

Should not need to run pyinstaller as sudo.
Not sure on permissions setup Mac,can make a virtual environment(build into python) that should fix permissions issues.

Quick demo.
tom@tom-VirtualBox:~$ python -V
Python 3.8.5
tom@tom-VirtualBox:~$ pip -V
pip 20.2.3 from /home/tom/.pyenv/versions/3.8.5/lib/python3.8/site-packages/pip (python 3.8)

# Make 
tom@tom-VirtualBox:~$ python -m venv py_env

# cd in
tom@tom-VirtualBox:~$ cd py_env

# Activate 
tom@tom-VirtualBox:~/py_env$ source bin/activate

# Install
(py_env) tom@tom-VirtualBox:~/py_env$ pip install pyinstaller
Collecting pyinstaller
  Downloading pyinstaller-4.1.tar.gz (3.5 MB) .....
  
Successfully installed altgraph-0.17 pyinstaller-4.1 pyinstaller-hooks-contrib-2020.10

# Now will pyisntaller run from this folder
(py_env) tom@tom-VirtualBox:~/py_env$ which pyinstaller
/home/tom/py_env/bin/pyinstaller
Reply


Messages In This Thread
RE: PyInstaller on Mac ... does not work easily? - by mu234 - Nov-20-2020, 10:43 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to easily create a list of already existing item CompleteNewb 15 3,680 Jan-06-2022, 12:48 AM
Last Post: CompleteNewb

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020