Giter Site home page Giter Site logo

Comments (7)

xlcnd avatar xlcnd commented on July 21, 2024

Hi.

Have you tried pip install --user isbntools?

from isbntools.

workflowsguy avatar workflowsguy commented on July 21, 2024

Have you tried pip install --user isbntools?

Yes. While this command shows no errors, after running isbntools it gives -bash: isbntools: command not found.

Running pip3 -v install isbntools produces the following error:

ERROR: Could not install packages due to an EnvironmentError.
Consider using the `--user` option or check the permissions.
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 407, in run
    use_user_site=options.use_user_site,
  File "/usr/local/lib/python3.7/site-packages/pip/_internal/req/__init__.py", line 71, in install_given_reqs
    **kwargs
  File "/usr/local/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 811, in install
    direct_url=direct_url,
  File "/usr/local/lib/python3.7/site-packages/pip/_internal/operations/install/wheel.py", line 630, in install_wheel
    direct_url=direct_url,
  File "/usr/local/lib/python3.7/site-packages/pip/_internal/operations/install/wheel.py", line 453, in install_unpacked_wheel
    clobber(source, dest, False, fixer=fixer, filter=filter)
  File "/usr/local/lib/python3.7/site-packages/pip/_internal/operations/install/wheel.py", line 380, in clobber
    ensure_dir(destdir)
  File "/usr/local/lib/python3.7/site-packages/pip/_internal/utils/misc.py", line 111, in ensure_dir
    os.makedirs(path)
  File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/os.py", line 223, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/usr/local/isbntools'

Why does the script want to create a folder /usr/local/isbntools? All binary files should be created in /usr/local/bin.
The creation of this directory obviously fails because the permissions of /usr/local/ are set as
owner: root, group: wheel

Also, if attempting to remove isbntools with pip3 uninstall isbntools, none of the isbntools scripts in /usr/local/bin are actually removed.

from isbntools.

xlcnd avatar xlcnd commented on July 21, 2024

All these problems are related with how pip3 works in your system! isbntools doesn't use any special installation code.

The creation of isbntools directory, once again, is how pip tries to install data files in your system. You should check the documentation of pip3 for your system!

My suggestion is that you install isbntools (and other similar apps) inside a virtual environment.

from isbntools.

workflowsguy avatar workflowsguy commented on July 21, 2024

All these problems are related with how pip3 works in your system! isbntools doesn't use any special installation code.

The creation of isbntools directory, once again, is how pip tries to install data files in your system. You should check the documentation of pip3 for your system!

This issue is not related to "how pip works on my system", because

  1. the Python version that is installed with homebrew has no modifed pip/pip3
  2. in the meantime, I have installed several other Python packages that have a CLI with pip3 install PACKAGE (e.g. html2text, Django). None of those had any issue putting their CLI .py into /usr/local/bin/

from isbntools.

xlcnd avatar xlcnd commented on July 21, 2024

As I said before, the issue is "how pip works in your system", namely how pip installs data files in your system! Does, the packages you mention, have data files to install?

The isbntools package as no special "setup" code, so is pip who installs the package!

from isbntools.

xlcnd avatar xlcnd commented on July 21, 2024

But you could try the following procedure:

  1. Download the package
  2. Unzip it to a folder and go to that folder
  3. Edit the file setup.py and delete the line data_files=[('isbntools', ['isbntools/isbntools.conf'])],
  4. Enter pip install .

from isbntools.

workflowsguy avatar workflowsguy commented on July 21, 2024

After unsuccessfully trying various approaches to find the cause of this issue, at least I was finally able to get it installed by using pip -v install -e git+https://github.com/xlcnd/isbntools.git#egg=isbntools

from isbntools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.