Calling Setup.py in Ubuntu 20.04 does not work
-
wrote on 15 Jul 2020, 21:03 last edited by
Hello,
I have created a Setup.py file:
import os import sys from setuptools import setup setup(name='PQT-Texteditor', version='1.0', description='Barrierefreier Texteditor der plattformunabhängig ist', author='Markus Lemcke', author_email='info@marlem-software.de', url='https://www.marlem-software.de', install_requires=['PyQt5'], ) chmod +x setup.py python3 setup.py install
I got the following error message:
error: can't create or remove files in install directoryThe following error occurred while trying to add or remove files in the
installation directory:[Errno 13] Permission denied: '/usr/local/lib/python3.8/dist-packages/test-easy-install-3247.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:/usr/local/lib/python3.8/dist-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.For information on other options, you may wish to consult the
documentation at:https://setuptools.readthedocs.io/en/latest/easy_install.html
Question:
What does this error message say? What do I have to do so that I can run the setup.py file on Ubuntu? -
Hello,
I have created a Setup.py file:
import os import sys from setuptools import setup setup(name='PQT-Texteditor', version='1.0', description='Barrierefreier Texteditor der plattformunabhängig ist', author='Markus Lemcke', author_email='info@marlem-software.de', url='https://www.marlem-software.de', install_requires=['PyQt5'], ) chmod +x setup.py python3 setup.py install
I got the following error message:
error: can't create or remove files in install directoryThe following error occurred while trying to add or remove files in the
installation directory:[Errno 13] Permission denied: '/usr/local/lib/python3.8/dist-packages/test-easy-install-3247.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:/usr/local/lib/python3.8/dist-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.For information on other options, you may wish to consult the
documentation at:https://setuptools.readthedocs.io/en/latest/easy_install.html
Question:
What does this error message say? What do I have to do so that I can run the setup.py file on Ubuntu?wrote on 15 Jul 2020, 21:35 last edited by JonB@PythonQTMarlem
Just from reading what it says: you don't have permission to write into/usr/local/lib/python3.8/dist-packages/test-easy-install-3247.write-test
. Either runs as a user who does and wishes to install there, or follow the suggestion of--install-dir ...
to specify where you want it installed.?
-
wrote on 16 Jul 2020, 01:59 last edited by
thank you.
This directory /usr/local/lib/python3.8/dist-packages/test-easy-install-3247.write-test can call:
/usr/local/lib/python3.9/dist-packages/test-easy-install-3247.write-test
/usr/local/lib/python4.0/dist-packages/test-easy-install-3247.write-test
and so on.I think i have to look to --install-dir to define this in setup.py
-
thank you.
This directory /usr/local/lib/python3.8/dist-packages/test-easy-install-3247.write-test can call:
/usr/local/lib/python3.9/dist-packages/test-easy-install-3247.write-test
/usr/local/lib/python4.0/dist-packages/test-easy-install-3247.write-test
and so on.I think i have to look to --install-dir to define this in setup.py
@PythonQTMarlem Just to add to @JonB /usr/local is not writeable by non root users. If you want to install there you have to use sudo.
-
wrote on 16 Jul 2020, 07:36 last edited by PythonQTMarlem
-
@PythonQTMarlem Code examples for what?
To use sudo you just dosudo ./Setup.py
-
wrote on 16 Jul 2020, 07:41 last edited by PythonQTMarlem
@PythonQTMarlem said in Calling Setup.py in Ubuntu 20.04 does not work:
You think: sudo python3 setup.py install
Right? -
@PythonQTMarlem said in Calling Setup.py in Ubuntu 20.04 does not work:
You think: sudo python3 setup.py install
Right?@PythonQTMarlem Yes, but python3 should not be necessery if you have
#!/usr/bin/env python3
-
wrote on 16 Jul 2020, 10:03 last edited by
@jsulm said in Calling Setup.py in Ubuntu 20.04 does not work:
#!/usr/bin/env python3
sudo python3 setup.py install works. Thank you.
The #! / Usr / bin / env python3 doesn't always work. But that's the next topic I'm going to deal with.
-
@jsulm said in Calling Setup.py in Ubuntu 20.04 does not work:
#!/usr/bin/env python3
sudo python3 setup.py install works. Thank you.
The #! / Usr / bin / env python3 doesn't always work. But that's the next topic I'm going to deal with.
wrote on 16 Jul 2020, 12:47 last edited by@PythonQTMarlem said in Calling Setup.py in Ubuntu 20.04 does not work:
The #! / Usr / bin / env python3 doesn't always work. But that's the next topic I'm going to deal with.
Look forward to reading what you say about that not working :)
-
@PythonQTMarlem said in Calling Setup.py in Ubuntu 20.04 does not work:
The #! / Usr / bin / env python3 doesn't always work. But that's the next topic I'm going to deal with.
Look forward to reading what you say about that not working :)
@JonB said in Calling Setup.py in Ubuntu 20.04 does not work:
Look forward to reading what you say about that not working :)
Executable bit not set? :-)
1/11