DEV Community

Discussion on: Using Python and C together

Collapse
 
haiman profile image
Alexander • Edited

Thank you for this post.
[FYI: Ubuntu 20.04, Python 3.8] I tried it out just for fun but encountered some problems. I get a "permission denied" back when I run the install:

python setup.py install
running install
running build
running build_ext
running install_lib
copying build/lib.linux-x86_64-3.8/ModuleName.cpython-38-x86_64-linux-gnu.so -> /usr/local/lib/python3.8/dist-packages
error: could not create '/usr/local/lib/python3.8/dist-packages/ModuleName.cpython-38-x86_64-linux-gnu.so': Permission denied

I solved it by running : sudo chown -R $USER /usr/local/lib/python3.8

However, when trying to run the setup.py, it tells me "python not found". I tried running python3 setup.py build and install just in case but nope.