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

Six issue when installing package on OS X 10.11 El Capitan #54

Open
NickStefan opened this issue May 23, 2016 · 11 comments
Open

Six issue when installing package on OS X 10.11 El Capitan #54

NickStefan opened this issue May 23, 2016 · 11 comments
Labels

Comments

@NickStefan
Copy link

NickStefan commented May 23, 2016

I. when I try and pip install I get this error:

➜  ~ pip install haxor-news
Collecting haxor-news
Collecting prompt-toolkit==0.52 (from haxor-news)
  Using cached prompt_toolkit-0.52-py2-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): colorama>=0.3.3 in /Library/Python/2.7/site-packages (from haxor-news)
Requirement already satisfied (use --upgrade to upgrade): requests>=2.4.3 in /Library/Python/2.7/site-packages (from haxor-news)
Requirement already satisfied (use --upgrade to upgrade): pygments>=2.0.2 in /Library/Python/2.7/site-packages (from haxor-news)
Collecting six>=1.9.0 (from haxor-news)
  Using cached six-1.10.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): click>=5.1 in /Library/Python/2.7/site-packages (from haxor-news)
Collecting wcwidth (from prompt-toolkit==0.52->haxor-news)
  Using cached wcwidth-0.1.6-py2.py3-none-any.whl
Installing collected packages: six, wcwidth, prompt-toolkit, haxor-news
  Found existing installation: six 1.4.1
    DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling six-1.4.1:
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 317, in run
    prefix=options.prefix_path,
  File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 736, in install
    requirement.uninstall(auto_confirm=True)
  File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 742, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 267, in renames
    shutil.move(old, new)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
    copy2(src, real_dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
    copystat(src, dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
    os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/var/folders/n9/_fh0q6555sb_djs4_l70t1y80000gn/T/pip-A9Ynf3-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
➜  ~

II. this points to a solution, but does not work: http://stackoverflow.com/questions/31900008/oserror-errno-1-operation-not-permitted-when-installing-scrapy-in-osx-10-11

pip install --ignore-installed six

III. so then I tried to build from a docker container I found here, but it outputs:

https://hub.docker.com/search/?isAutomated=0&isOfficial=0&page=1&pullCount=0&q=haxornews&starCount=0

docker run sthysel/docker-haxornews
Version: 0.3.1
Syntax: hn <command> [params] [options]
Traceback (most recent call last):
  File "/usr/local/bin/haxor-news", line 9, in <module>
    load_entry_point('haxor-news==0.3.1', 'console_scripts', 'haxor-news')()
  File "/usr/local/lib/python3.5/site-packages/haxor_news/main.py", line 26, in cli
    haxor.run_cli()
  File "/usr/local/lib/python3.5/site-packages/haxor_news/haxor.py", line 205, in run_cli
    document = self.cli.run()
  File "/usr/local/lib/python3.5/site-packages/prompt_toolkit/interface.py", line 321, in run
    with self.input.raw_mode():
  File "/usr/local/lib/python3.5/site-packages/prompt_toolkit/input.py", line 65, in raw_mode
    return raw_mode(self.stdin.fileno())
  File "/usr/local/lib/python3.5/site-packages/prompt_toolkit/terminal/vt100_input.py", line 344, in __init__
    self.attrs_before = termios.tcgetattr(fileno)
termios.error: (25, 'Inappropriate ioctl for device')

The dockerfile is exactly what I'd expect:


FROM python:3.5
MAINTAINER https://github.com/sthysel/docker-haxornews

RUN pip install haxor-news

CMD ["haxor-news"]
@donnemartin
Copy link
Owner

Hi Nick, does this help? I can add this to the README.

Mac OS X (10.11 El Capitan) users

There is a known issue with Apple and its included python package dependencies (more info at pypa/pip#3165).

 $ sudo pip install haxor-news --upgrade --ignore-installed six

@NickStefan
Copy link
Author

NickStefan commented May 24, 2016

that worked! @donnemartin

@donnemartin
Copy link
Owner

Thanks for confirming! Added a note to README and INSTALLATION with 44d071c.

@donnemartin donnemartin changed the title Trouble installing (python errors) Six issue when installing package May 30, 2016
@donnemartin donnemartin changed the title Six issue when installing package Six issue when installing package on OS X 10.11 El Capitan May 30, 2016
@TheDahomean
Copy link

Just an fyi. It worked for me too

$ sudo pip install haxor-news --upgrade --ignore-installed six

thanks!

@MiaoJiHui
Copy link

That worked for me too! Thanks!!
sudo pip install Scrapy --upgrade --ignore-installed six

@micahp
Copy link

micahp commented Jul 27, 2017

This also worked for me, for the six package!

⇒ sudo pip install --ignore-installed six

@bersoriano
Copy link

Worked for me too!! sudo pip install -U flask-cors --ignore-installed six

@randylicata
Copy link

@donnemartin You're a savor

@YDJSZY
Copy link

YDJSZY commented Jan 28, 2018

It not work for me....

@kingstonlee
Copy link

@YDJSZY try using sudo.

@HandyBrains
Copy link

worked for me.. Thanks
pip install boto3 --ignore-installed six

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants