pip install `--user` fails
forrestbao opened this issue · 8 comments
I just tried to install PyDataFront using pip from a local git clone of PyDataFront. and with the option --user
. But after the installation, I cannot find pydatafront under ~/.local/lib/python3.10/site-packages
. Importing pydatafront also gets the error No module named 'pydatafront'
My Python version is 3.10.
$ python3 -m pip install --user .
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Processing /home/forrest/Textea/PyDataFront
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pydatafront
Building wheel for pydatafront (pyproject.toml) ... done
Created wheel for pydatafront: filename=pydatafront-0.0.0-py3-none-any.whl size=1012 sha256=96499be8e950bea404d576d6a5c020bcc4626961b8f2dbc0aa66f94c3d1025ee
Stored in directory: /tmp/pip-ephem-wheel-cache-skjduxoi/wheels/5e/1b/ed/7a32aaf1f6dcc2c36b88d2ba1d01ce11d4f196fe75ccf93a3f
Successfully built pydatafront
Installing collected packages: pydatafront
Attempting uninstall: pydatafront
Found existing installation: pydatafront 0.0.0
Uninstalling pydatafront-0.0.0:
Successfully uninstalled pydatafront-0.0.0
Successfully installed pydatafront-0.0.0
Why it is 0.0.0? The version is 0.0.1 on my end.
I don't know why it showed 0.0.0. I pulled from the latest commit this morning.
I even check pyproject.toml
and setup.cfg
. The version there was 0.0.1.
Let me test it on Docker.
I have no issue installing and running it on Docker image python:3.10-bullseye
.
root@2b83b188f1de:/app# ls
README.md docs frontend pydatafront.egg-info setup.cfg
backend examples main.py pyproject.toml
root@2b83b188f1de:/app# python3 -m pip install --user .
Processing /app
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting flask
Downloading Flask-2.1.2-py3-none-any.whl (95 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 95.2/95.2 KB 6.1 MB/s eta 0:00:00
Collecting flask-cors
Downloading Flask_Cors-3.0.10-py2.py3-none-any.whl (14 kB)
Collecting itsdangerous>=2.0
Downloading itsdangerous-2.1.2-py3-none-any.whl (15 kB)
Collecting Jinja2>=3.0
Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 KB 14.7 MB/s eta 0:00:00
Collecting Werkzeug>=2.0
Downloading Werkzeug-2.1.2-py3-none-any.whl (224 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 224.9/224.9 KB 5.0 MB/s eta 0:00:00
Collecting click>=8.0
Downloading click-8.1.3-py3-none-any.whl (96 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.6/96.6 KB 9.1 MB/s eta 0:00:00
Collecting Six
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting MarkupSafe>=2.0
Downloading MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (26 kB)
Building wheels for collected packages: pydatafront
Building wheel for pydatafront (pyproject.toml) ... done
Created wheel for pydatafront: filename=pydatafront-0.0.1-py3-none-any.whl size=3965 sha256=c3384df0511c1eaecd735e1e471d3fd56b88b7949751751aaf2781e3d8fd9242
Stored in directory: /tmp/pip-ephem-wheel-cache-o1n7qpgb/wheels/9b/2c/d1/15e20a2b97f37ccf65a87ba1049c73a9076d0bf0fbaf814e83
Successfully built pydatafront
Installing collected packages: Werkzeug, Six, MarkupSafe, itsdangerous, click, Jinja2, flask, flask-cors, pydatafront
WARNING: The script flask is installed in '/root/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed Jinja2-3.1.2 MarkupSafe-2.1.1 Six-1.16.0 Werkzeug-2.1.2 click-8.1.3 flask-2.1.2 flask-cors-3.0.10 itsdangerous-2.1.2 pydatafront-0.0.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 22.0.4; however, version 22.1.2 is available.
You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.
root@2b83b188f1de:/app# python3 -m pydatafront
usage: __main__.py [-h] [--host HOST] [--port PORT] this_class main_class
__main__.py: error: the following arguments are required: main_class
And my package is small than yours. Created wheel for pydatafront: filename=pydatafront-0.0.0-py3-none-any.whl size=1012 sha256=1f2ff66ab294e51efe1d59a113cc4e85e151d101eb84f0e977157772eeba503b
Did you push everything up-to-date into the main
branch?
I think I have finally found a fix to this issue. Just upgrade pip. Maybe our configuration files require some advanced features in pip. The pip that comes with Ubuntu 22.04 is of version 22.0.2. After I upgrade pip with pip install --upgrade pip
to pip-23.0.1, the installation issue is gone.