plone / Installers-UnifiedInstaller

Linux/BSD/OSX Installer
28 stars 24 forks source link

pip: No such file or directory on macOS Catalina #96

Closed tkimnguyen closed 4 years ago

tkimnguyen commented 4 years ago

I was just trying out the installer on my iMac, which I recently upgraded to Catalina. I’m getting this error. Looking at how pip should be installed.

$ ./install.sh --target=/Users/kim/PloneBuilds/Plone-5.2.0-try2 --with-python=`which python3` standalone

Testing /usr/bin/python3 for Zope/Plone requirements....
/usr/bin/python3 looks OK. We will use it.

Rootless install method chosen. Will install for use by system user kim

Detailed installation log being written to /Users/kim/Downloads/Plone-5.2.0-UnifiedInstaller-r2/install.log
Installing Plone 5.2.0 at /Users/kim/PloneBuilds/Plone-5.2.0-try2

Creating Python virtual environment.
Using base prefix '/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7'
New python executable in /Users/kim/PloneBuilds/Plone-5.2.0-try2/zinstance/bin/python3
Also creating executable in /Users/kim/PloneBuilds/Plone-5.2.0-try2/zinstance/bin/python
Installing Python requirements in virtual environment.
Unable to install Python requirements in virtual environment.

Installation has failed.
See the detailed installation log at /Users/kim/Downloads/Plone-5.2.0-UnifiedInstaller-r2/install.log
to determine the cause.

And here is the log:

Detailed installation log
Starting at Sat 30 Nov 2019 09:19:24 CST
Traceback (most recent call last):
  File "virtualenv.py", line 2580, in <module>
    main()
  File "virtualenv.py", line 831, in main
    symlink=options.symlink,
  File "virtualenv.py", line 1106, in create_environment
    install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages=site_packages, clear=clear, symlink=symlink)
  File "virtualenv.py", line 1568, in install_python
    shutil.copy(original_python, py_executable)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/shutil.py", line 245, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/shutil.py", line 103, in copyfile
    if _samefile(src, dst):
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/shutil.py", line 88, in _samefile
    return os.path.samefile(src, dst)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/genericpath.py", line 96, in samefile
    s1 = os.stat(f1)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
helper_scripts/main_install_script.sh: line 951: /Users/kim/PloneBuilds/Plone-5.2.0/zinstance/bin/pip: No such file or directory
tkimnguyen commented 4 years ago

According to https://virtualenv.pypa.io/en/latest/changes/#v16-7-0-2019-07-23 it is in virtualenv 16.7.0 that you can create virtual environments for 3.xy (https://github.com/pypa/virtualenv/pull/1385). I modified the main_install_script.sh to download virtualenv 16.7.8 (the latest) and use it instead of the included 16.6.0, and it created the virtualenv successfully, including installing pip.

tkimnguyen commented 4 years ago

I'm now looking at how to update the included virtualenv to 16.7.8 ... great docs at https://github.com/plone/Installers-UnifiedInstaller/blob/master/UPDATING_ME.txt !

tkimnguyen commented 4 years ago

Fixed in https://github.com/plone/Installers-UnifiedInstaller/pull/97. New release of installer uploaded to https://launchpad.net/plone/5.2/5.2/+download/Plone-5.2.0-UnifiedInstaller-r3.tgz and will be linked from https://plone.org/download/releases/5.2 once more testing is complete (tested on macOS Catalina).

tkimnguyen commented 4 years ago

Linked