1

I'm using AWS for work with Anaconda in it. I don't have permission to install any python library (I mean, I requested it and it's taking ages) so I'm trying to see if there's a way around it.

I'm trying to install xgboost, is it possible to do so without actually installing it? I thought maybe copying and pasting the base code, but it's a bit messy I guess? Any better recommendations?

I tried using a virtual environment (venv) and it doesn't seem to work... it's not allowing me to create a virtual env, I guess it's because of the permits I said before.

Edit: I basically cannot install anything (I can't even access google actually, just the company approved websites). The first idea, of pasting the base code, I will have to send it over from my personal email to my work email so I can get it there, but it's not very simple either.

amestrian
  • 546
  • 3
  • 12
  • 1
    Someone seems to have faced the same problem before: https://stackoverflow.com/questions/9059699/python-use-a-library-locally-instead-of-installing-it Is this related to the problem you are facing? – Knl_Kolhe Sep 16 '20 at 16:50

3 Answers3

0
  • Download Package which you want to install
  • unzip and cd into folder
  • run python setup.py with --user flag
ls_da3m0ns
  • 146
  • 5
0

If you have access to the site-packages directory, you can copy the package directly into there, as you suggested. I guess installing from a wheel also wouldn't work?

You could also just redownload python into a directory you have access to and start from there.

Also, does Anaconda use venv? I've always used conda create to make an anaconda virtual environment.

C.Mac
  • 1
  • 1
0

I have used some modules in python (pexpect) without actually installing the module, but instead having the module file within the same folder where I have the project. And just calling the import (module) in the code.

i'm not sure if it can work for you, but you should give it a try.