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```