0

Hi I am facing an issue where I want to install certain files in a current virtual env, but I am presented with this error.

python setup.py install
    running install
    error: can't create or remove files in install directory
    ........
    
        [Errno 2] No such file or directory: '/usr/local/lib64/python3.6/site-packages/test-easy-install-106022.write-test'
    
    The installation directory you specified (via --install-dir, --prefix, or
    the distutils default setting) was:
    
        /usr/local/lib64/python3.6/site-packages/
    
    This directory does not currently exist.  Please create it and try again, or
    choose a different installation directory (using the -d or --install-dir
    option).

then I tried this,

python setup.py  --install-dir=/opt/company/product/3.0.0.1/lib64/python3.6/site-packages/
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: option --install-dir not recognized

which is failing as well, so first I want packages to be installed in the virtual env I have or if not possible try to in have correct usage specified by install-dir command.

EDIT:

I tried as suggested

(3.0.0.1) [root@sl2rhel8snappy01 python-snappy]# python setup.py install --install-dir=/opt/company/product/3.0.0.1/lib64/python3.6/site-packages/
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: option --install-dir not recognized

and

usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: option -d not recognized```
vector8188
  • 1,293
  • 4
  • 22
  • 48
  • See in the usage message where it says `usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]`? Do you understand what it means by `global_opts` and `cmd1_opts`? What do you think should be the `cmd1` for your purposes? – Karl Knechtel Jul 26 '20 at 02:54
  • 1
    do you think you can give a bit less snarky reply and come directly to point ? – vector8188 Jul 26 '20 at 02:57
  • I am not trying to be snarky; I am trying to assess how much assistance is required. I'll take that as "please write a full answer". – Karl Knechtel Jul 26 '20 at 03:02
  • Ah, looks like there is a different issue, and I found a duplicate question that should solve your problem. – Karl Knechtel Jul 26 '20 at 03:13

0 Answers0