Skip to content
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

make install command uninstalls user packages; guide omits the need for a virtual environment #53

Closed
ghost opened this issue Mar 3, 2021 · 3 comments
Assignees
Labels
bug Something isn't working development

Comments

@ghost
Copy link

ghost commented Mar 3, 2021

Steps to reproduce

  1. Clone the repository
  2. Read and follow the installation guide
  3. First step is make install

Expected result

The install script will install the application, without affecting the existing user installed packages or operating system.

Actual result

The install script tries to uninstall existing user packages. Because this is not permitted, this leads to an error.

pip-sync requirements/app.txt
Found existing installation: ansible 2.9.6
Can't uninstall 'ansible'. No files were found to uninstall.
Found existing installation: apt-clone 0.2.1
ERROR: Cannot uninstall 'apt-clone'. 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.

Possible solutions

  1. Check if the installation is run in a virtual environment and stop if it is not. Even better, have the application installed in a container by building a docker image during the installation.
  2. In the developer guide, a virtual environment is set up. This step is omitted in the installation guide.
@nhoening
Copy link
Contributor

nhoening commented Mar 3, 2021

Thanks for the report. This is something we should support better.

I'm not sure how to check if one is in a virtual environment, but that is a good idea.

I'm also working on making FlexMeasures pip-installable, which is what most people would want to do who are not planning on developing it.
The advice to run make install would go to Develop.md.

@nhoening nhoening added bug Something isn't working development labels Mar 3, 2021
@nhoening nhoening self-assigned this Mar 3, 2021
@create-issue-branch
Copy link
Contributor

@nhoening nhoening changed the title Install script wants to uninstall user packages; guide omits the need for a virtual environment make install command uninstalls user packages; guide omits the need for a virtual environment Mar 8, 2021
@nhoening
Copy link
Contributor

PR #54 has landed, so the main installation is now much better (using pip) and one gets a working app. The whole trip (from zero to a useful installation) is not yet finished.

However, this ticket can be closed. I did also add a comment for developers to make sure they do use a fresh virtual environment. (see PR #72).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working development
Projects
None yet
Development

No branches or pull requests

1 participant