简体   繁体   中英

Is it safe to install non python packages (java updates, c++ updates) in an Anaconda virtual environment?

I am running Anaconda on MacOS and I have multiple virtual environments for different versions of Python, TensorFlow, Pytorch, etc...

Recently I have tried to install Auto-Keras and to build Tensorflow from the source (each in a separate virtual env), and in both cases it asked me to update a bunch of C++ stuff (SWIG, gcc,..), a new java version, among other things, and occasionally it is asking me for my root password halfway through the process.

With Python style pip install <lib> I always assumed it was safe to do whatever I wanted in a given virtual env, since the whole point what that it containerized the dependencies and packages, and installs in other virtual env won't be broken.

But in this case, I am worried, since:

a) They are not installed using pip or conda

b) It keeps asking me to type in my admin password and changing global configurations like the Java vision etc....

Are other packages besides python packages "containerized" in the same way that Python packages are in a virtual env?

If not, do I risk breaking stuff by upgrading C++, SWIG, Java, etc...?

First, virtual env gives you no protection:) It just modifies PATH environment variable. You are not in a safe sandbox even with Python packages. pip install xxx will execute setup.py which could also introduce malware.

Second, yes, they are asking you for sudo permission, and definitely, it is dangerous. But you still can trust who is worth to trust. After all, you still use a third-party OS instead of creating it on your own right?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM