Closed slodge closed 1 year ago
Do you know whether these packages were installed by pip
, or via the conda
package repository?
Not entirely sure I know what I'm doing so apologies if my answers are a little imprecise...
On this development box I didn't have a python installation configured, so the R console prompted me to install and use miniconda - which seemed to bundle most of these packages with it.
The only addition was pandas - i installed that using py_install from within R.
Not sure if that answers your question...
On Fri, 26 Mar 2021, 21:49 Kevin Ushey, @.***> wrote:
Do you know whether these packages were installed by pip, or via the conda package repository?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rstudio/rsconnect/issues/494#issuecomment-808531130, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAECJHSETTMAZIMUXYN432DTFT6ORANCNFSM4Z3R22UA .
@mmarchetti Do you know why this might happen?
Yes. Conda leaves metadata hanging around, and pip (as of pip 20.1) picks it up and includes it in the output from pip freeze
. See https://github.com/rstudio/rsconnect-python/issues/166. We've worked around this by using pip list --format=freeze
, which omits the metadata paths, but that may change given https://github.com/pypa/pip/issues/8176 and https://github.com/pypa/pip/issues/7157.
Some options here:
requirements.txt
file in the directory being deploy, so that environment inspection is not used.Since there hasn't been any follow up in the last few months, and it sounds like there's a good chance this is fixed in main, I'm going to close this issue. Happy to reopen if there's more work to be done.
I'm using python inside connect for the first time this week - so apologies if these are "newbie" errors.
I'm working on Windows desktop and discovering that the generated pip requirements.txt file includes some nasty local file paths which cause pip on the server to fail.
For example, using a standard notebook like https://github.com/sol-eng/python-examples/tree/master/rmarkdown-notebook
This causes
rsconnect::writeManifest("reticulate", "FirstAttempt.Rmd")
to generate arequirements.txt
file:This will not upload to the server unless I manually edit it down to:
I think this is somehow related to https://github.com/pypa/pip/issues/8174 - it seems like the miniconda distribution that RStudio installed has
pip --version
ofpip 21.0.1
For now I'm working around this by manually editing the requirements files.
Is this just a bug in pip? Or is it something rsconnect needs to be aware of too?