This configuration may cause unexpected behavior and is unsupported. However, it throws another warning DEPRECATION: Location-changing options found in -install-option: from command line. Removing the -system flag makes the command work. When I ran the above solution in Mac, python 3.8.1, pip3 20.0.2, it complains no such option: -system. Compared to npm, yarn of nodejs, there are too many errors for even a straightforward operation. I wonder about the stability of python's package management. Now, the binary appears in all PCs in /home/transang/my-python-packages/bin directory.
pip3 install -system -target=/home/transang/my-python-packages -install-option=-install-scripts=/home/transang/my-python-packages/bin awscli With the new solution, I came up with the next solutionĪdding -install-option solves the problem introduced previously. I again discovered the solution from here. In the PC3, there is binary installed in /home/transang/my-python-packages. The command successfully ended in all PCs. I needed to specify -system option to prevent the default -user option.Īfter adding the -system option pip3 install -system -target=/home/transang/my-python-packages awscli Raise DistutilsOptionError("can't combine user with prefix, "ĭ: can't combine user with prefix, exec_prefix/home, or install_(plat)base
Self.move_wheel_files(self.source_dir, root=root, prefix=prefix)įile "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 1064, in move_wheel_filesįile "/usr/lib/python3/dist-packages/pip/wheel.py", line 247, in move_wheel_filesįile "/usr/lib/python3/dist-packages/pip/locations.py", line 153, in distutils_schemeįile "/usr/lib/python3.6/distutils/command/install.py", line 274, in finalize_options There was the following error Exception:įile "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in mainįile "/usr/lib/python3/dist-packages/pip/commands/install.py", line 360, in runįile "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 784, in installįile "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 851, in install The command successfully finished in the PC3. Very simple with the -target option pip3 install -target=/home/transang/my-python-packages awscli PC1 and PC2 introduce bugs while the first solution works perfectly in PC3. Lsb_repip 18.1 from /usr/lib/python3/dist-packages/pip (python lsb_release -a Lsb_pip 9.0.1 from /usr/lib/python3/dist-packages (python lsb_release -a Pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6) If you arrive here to know the post title's solution, I highly recommend reading from the end of the post. I will introduce the bugs one by one before coming up with a stable solution for this use case. But latterly it got complicated as many bugs appeared.
MacOS already have Python installed in it.