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

Do not install pip packages into the current environment #639

Closed
ptheywood opened this issue Aug 13, 2021 · 2 comments · Fixed by #935
Closed

Do not install pip packages into the current environment #639

ptheywood opened this issue Aug 13, 2021 · 2 comments · Fixed by #935

Comments

@ptheywood
Copy link
Member

During CMake configuration with -DBUILD_SWIG_PYTHON several pip packages are automatically installed into the current python environment if they are not found.

This might just be the users default python environment.

If so, it is poor form to do this without any kind of prompt to the user.

I believe this should have been covered by a previous issue, but I couldn't find it. I previously had done some work on performing everything in a venv within the build directory as part of #285, but ran into issues with Windows so stopped working on that if i remember correctly.

Related to #267 and probably others.

@ptheywood ptheywood added this to the v2.0.0-alpha.N milestone Aug 13, 2021
@ptheywood
Copy link
Member Author

e.g. if a venv is active, user installs fail as follows:

CMake Warning at swig/python/CMakeLists.txt:222 (message):
  Can't find python module "wheel", user install it using pip...
Call Stack (most recent call first):
  swig/python/CMakeLists.txt:233 (search_python_module)


ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.

@mondus
Copy link
Member

mondus commented Oct 19, 2022

Make wheel a dependency and fix later.

ptheywood added a commit that referenced this issue Oct 19, 2022
Wheel, setuptools and optionall venv are requred.
Installing into --user automatically would fail in some cases, and installing not into user into a not-generated venv is bad form.

Closes #639
ptheywood added a commit that referenced this issue Oct 19, 2022
Wheel, setuptools and optionall venv are requred.
Installing into --user automatically would fail in some cases, and installing not into user into a not-generated venv is bad form.

Closes #639
ptheywood added a commit that referenced this issue Oct 19, 2022
Wheel, setuptools and optionall venv are requred.
Installing into --user automatically would fail in some cases, and installing not into user into a not-generated venv is bad form.

Closes #639
mondus pushed a commit that referenced this issue Oct 26, 2022
Wheel, setuptools and optionall venv are requred.
Installing into --user automatically would fail in some cases, and installing not into user into a not-generated venv is bad form.

Closes #639
ptheywood added a commit that referenced this issue Oct 26, 2022
Wheel, setuptools and optionall venv are requred.
Installing into --user automatically would fail in some cases, and installing not into user into a not-generated venv is bad form.

Closes #639
ptheywood added a commit that referenced this issue Oct 26, 2022
* Error at CMake Configure time for missing python packages

Wheel, setuptools and optionall venv are requred.
Installing into --user automatically would fail in some cases, and installing not into user into a not-generated venv is bad form.

Closes #639

* Switch to using build python package from setup.py install

Closes #947

* Add info about cmake python finding to the readme

This is not an ideal location, but the best option without more signifcant change to the readme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants