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

NotADirectoryError #1

Closed
robintw opened this issue Oct 6, 2015 · 6 comments
Closed

NotADirectoryError #1

robintw opened this issue Oct 6, 2015 · 6 comments
Labels

Comments

@robintw
Copy link

robintw commented Oct 6, 2015

pigar sounds great, and I've just tried to use it on my machine, but I get the following error:

Traceback (most recent call last):
  File "/opt/anaconda3/bin/pigar", line 7, in <module>
    from pigar.__main__ import main
  File "/opt/anaconda3/lib/python3.4/site-packages/pigar/__main__.py", line 17, in <module>
    _installed_pkgs = get_installed_pkgs_detail()
  File "/opt/anaconda3/lib/python3.4/site-packages/pigar/reqs.py", line 186, in get_installed_pkgs_detail
    for file in os.listdir(search_path):
NotADirectoryError: [Errno 20] Not a directory: '/opt/anaconda3/lib/python3.4/site-packages/setuptools-18.1-py3.4.egg'

I'm running Anaconda on OS X Yosemite, and I think it's having problems with dealing with .egg files.

Any ideas?

@damnever
Copy link
Owner

damnever commented Oct 6, 2015

Could you post your sys.path?

python -c "import sys; print(sys.path)"

I have no OS X system.

@robintw
Copy link
Author

robintw commented Oct 6, 2015

Here it is:

['', '/Users/robin/code/6SV1.0B_NewSubroutines/src/facebook-sdk', '/opt/anaconda3/lib/python34.zip', '/opt/anaconda3/lib/python3.4', '/opt/anaconda3/lib/python3.4/plat-darwin', '/opt/anaconda3/lib/python3.4/lib-dynload', '/opt/anaconda3/lib/python3.4/site-packages', '/opt/anaconda3/lib/python3.4/site-packages/Sphinx-1.3.1-py3.4.egg', '/opt/anaconda3/lib/python3.4/site-packages/aeosa', '/opt/anaconda3/lib/python3.4/site-packages/setuptools-18.1-py3.4.egg']

Interestingly, it looks slightly weird...but I think .eggs are allowed to be on the path.

@damnever
Copy link
Owner

damnever commented Oct 6, 2015

Now, try to update it:

pip install pigar --upgrade

@damnever damnever closed this as completed Oct 6, 2015
@robintw
Copy link
Author

robintw commented Oct 6, 2015

I now get the same error, but for a different file:

Traceback (most recent call last):
  File "/opt/anaconda3/bin/pigar", line 7, in <module>
    from pigar.__main__ import main
  File "/opt/anaconda3/lib/python3.4/site-packages/pigar/__main__.py", line 17, in <module>
    _installed_pkgs = get_installed_pkgs_detail()
  File "/opt/anaconda3/lib/python3.4/site-packages/pigar/reqs.py", line 193, in get_installed_pkgs_detail
    with open(top_level, 'r') as f:
NotADirectoryError: [Errno 20] Not a directory: '/opt/anaconda3/lib/python3.4/site-packages/abstract_rendering-0.5.1-py3.4.egg-info/top_level.txt'

@damnever damnever reopened this Oct 6, 2015
@damnever
Copy link
Owner

damnever commented Oct 6, 2015

Try this:
pip install git+https://github.com/Damnever/pigar.git@dir_error --upgrade

@robintw
Copy link
Author

robintw commented Oct 6, 2015

Great, that works - thanks!

(and, now I've been able to test it, it's a great tool - thanks. I'll probably blog about it soon)

@robintw robintw closed this as completed Oct 6, 2015
@damnever damnever added the bug label Oct 13, 2015
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

2 participants