Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to PIP Install. #23

Open
deshah10 opened this issue Sep 2, 2019 · 1 comment
Open

Unable to PIP Install. #23

deshah10 opened this issue Sep 2, 2019 · 1 comment

Comments

@deshah10
Copy link

deshah10 commented Sep 2, 2019

Hi,
I am currently running Python 3.7.1. When attempting to do "pip install parse-torrent-name", i get the following error:

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Unfortunately, I wasnt sure how to fix this error myself, however one way I got around to be able to use your wonderful script was by doing the following:

  1. Create a new folder locally called PTN.
  2. Inside the folder I created 2 new files called parse.py and patterns.py
  3. Then for each of the new files, I copied the raw code, from this github, for each of the respective files and pasted them to their respective files above.
  4. Finally the last fix I had to apply, was within your local parse.py file, I had to change .patterns to pattern, to make it:from patterns import patterns, types.

Now you can make use of the script as you please, I tested it and it works well.

@shifqu
Copy link

shifqu commented Jan 31, 2020

Hi,

First off, I am not related to this project, but I just figured I'd share what I found out.

Environment:

  • Windows 10
  • Python 3.7.4
  • pip 19.0.3
  • setuptools 40.8.0

So, when I tried pip install parse-torrent-name I received the following error:

Collecting parse-torrent-name (from -r requirements\common.txt (line 5))
  Downloading https://files.pythonhosted.org/packages/1a/c9/fbafe4f215ff24a1209e848763699cb8831d459c138fe164ea45b04c02ea/parse-torrent-name-1.1.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "Z:\Users\shifqu\AppData\Local\Temp\pip-install-dggs211f\parse-torrent-name\setup.py", line 5, in <module>
        description = f.read()
      File "Z:\Program Files (x86)\Python37-32\lib\encodings\cp1252.py", line 23, in decode
        return codecs.charmap_decode(input,self.errors,decoding_table)[0]
    UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 292: character maps to <undefined>

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in Z:\Users\shifqu\AppData\Local\Temp\pip-install-dggs211f\parse-torrent-name\

The important part here is the Traceback part, rather than the last line (Command "python...)

As you can read in the traceback, the error occurs in "...\parse-torrent-name\setup.py", line 5 when description = f.read() is executed.

I checked the file in github and noticed that line 5 here is:
readme_path = os.path.join(os.path.dirname(__file__), 'README.md')

So this is how I assumed that the pip version I am trying to install is different from the master-branch.

Because of this, instead of installing parse-torrent-name from pip, I install it directly from git:
pip install git+git://github.com/divijbindlish/parse-torrent-name.git#egg=parse-torrent-name

If you are using a requirements.txt file, you can just add git+git://github.com/divijbindlish/parse-torrent-name.git#egg=parse-torrent-name to it.

After installing PTN like this, everything works like a charm 👌

TL;DR pip version is outdated, install using git+git protocol

Useful resource on git+git protocol

seppi91 added a commit to seppi91/Watcher3 that referenced this issue Jun 21, 2020
seppi91 added a commit to seppi91/Watcher3 that referenced this issue Jun 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants