I can run my application fine on my dev machine, but when I go to deploy it on streamlit, I get this error:
ERROR: Cannot uninstall 'entrypoints'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
I managed to resolve this problem by switching my environment manager for this project from conda to pip. There may be another way to resolve this, but I wasnât able to figure it out.
Welcome to the community @benjlis, glad you figured out a workaround!
Another possibility to try would be to remove all the unnecessary packages from the requirements.txt and see if it solves properly. If you just specify the packages you are importing and let conda install whatever versions, itâs possible that will work as well while still letting your app work correctly.
Some additional detail: I was originally using conda, and I simplified my environment.yml to the bare minimum. The deployment errored on installing the stream-aggrid module, which is not yet available for installation via âconda install.â Conda needs to install pip to install stream-aggrid. This worked fine on my machine, but it was this step that caused the deployment error.
It was not difficult to switch everything to pip, and that resolved the problem!
I experienced the same issue, but I couldnât move away from Conda. It seems like the root cause is that specifying an environment.yml file doesnât set up an isolated Conda environment as expected. Instead, it looks like packages from the environment.yml are added to an existing environment.
For the record, I managed to work around the issue by:
Removing the name: field from my environment.yml
Removing requirements like Jupyter from my environment.yml
This isnât ideal, as I ended up creating two environment files: One for deployment and one for development (where I use Jupyter, for example). This behaviour is also quite confusing and hard to debug, as the deployed Conda environment differs from my local Conda environment.
@randyzwitch can you please verify that I got this right? In any case, itâs worth documenting the behaviour, though the ideal solution would be for conda env create to yield the same results locally and when deployed.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking âAccept allâ, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.