-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poetry always updates packages when installed to system python #2079
Comments
I have this problem too, but in my case I'm not using the system Python, it seems to be to do with private repos. I'll mention it here since the symptom is the same. I fixed it by removing |
I guess they are not same bug. Package in vendor is not recognized as installed packages here. And I can't reproduce it, either. |
I was experiencing the same issue with poetry 1.0.9. I managed to narrow down the issue to some old "export PYTHONPATH" in my .bashrc file. After getting rid of that export, the issue went away. [optional] Debugging steps:
ValueError: '/home/hodei/src/my_package/my_pakcage.egg-info' does not start with '/home/hodei/src/my_package/.venv/src' Due to the above, all the packages "source_type" were getting marked as "directory" type. Later on, during the installation because of the different "source_type", at line poetry/poetry/puzzle/solver.py Line 95 in b19873a
Before removing the export, my sys.path was: $ echo $PYTHONPATH
/home/hodei/.local/lib/python/site-packages:/home/hodei/local/lib/python2.7/site-packages:
$ cd src/my_package
$ source .venv/bin/activate
$ python -c "import sys; print(sys.path)"
['', '/home/hodei/.local/lib/python/site-packages', '/home/hodei/local/lib/python2.7/site-packages', '/home/hodei/src/my_package', '/home/hodei/.pyenv/versions/3.7.7/lib/python37.zip', '/home/hodei/.pyenv/versions/3.7.7/lib/python3.7', '/home/hodei/.pyenv/versions/3.7.7/lib/python3.7/lib-dynload', '/home/hodei/src/my_package/.venv/lib/python3.7/site-packages'] After removing the export, my sys.path was: $ unset PYTHONPATH
$ cd src/my_package
$ source .venv/bin/activate
$python -c "import sys; print(sys.path)"
['', '/home/hodei/.pyenv/versions/3.7.7/lib/python37.zip', '/home/hodei/.pyenv/versions/3.7.7/lib/python3.7', '/home/hodei/.pyenv/versions/3.7.7/lib/python3.7/lib-dynload', '/home/hodei/src/my_package/.venv/lib/python3.7/site-packages', '/home/hodei/src/my_package/.venv/src/trading-ig', '/home/hodei/src/my_package'] |
Poetry always updates dependencies. I have non root user Dockerfile example: #...
USER pyuser
RUN pip install poetry==1.1.13 && poetry config virtualenvs.create false
#...
And poetry always updates installed dependencies.
How can i fix it? |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).Issue
In gist link I attached Dockerfile, pyproject.toml and poetry.lock files. Issue is when building docker image I used
poetry config virtualenvs.create false
to install dependencies to current system python interpreter. It works, but executingpoetry install
several times always updates some packages, which already installed:But if set
poetry config virtualenvs.create
to default (totrue
) and create and activate virtualenv, then severalpoetry install
works as expected and exit fast, because all packages already installed:The text was updated successfully, but these errors were encountered: