Mopidy Installation Error - python

Installing on Mac High Sierra, through a fresh installation of Brew, following the instructions on the website to the letter. It throws this error;
Traceback (most recent call last):
File "/usr/local/bin/mopidy", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3095, in <module>
#_call_aside
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3081, in _call_aside
f(*args, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3108, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 658, in _build_master
ws.require(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 959, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 846, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'Mopidy==2.1.0' distribution was not found and is required by the application
Clearly it's not finding the distro even though it's in the default location with all my other packages. Any idea why?

Did you done
brew tap mopidy/mopidy
before running:
brew install mopidy
??
Following these steps I manage to install it successfully.
I am on OS X 10.13.3

Related

pip3 assumes its using regular pip

❯ pip3
Traceback (most recent call last):
File "/usr/local/bin/pip3", line 6, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3241, in <module>
#_call_aside
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3225, in _call_aside
f(*args, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3254, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 585, in _build_master
return cls._build_from_requirements(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 598, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pip==20.2.3' distribution was not found and is required by the application
For some reason it says it's accessing /System/Library/Frameworks/Python.framework/Versions/2.7.
If I type in which pip3 it outputs, /usr/local/bin/pip3.
And so I used that to put in my path like so, export PATH="/usr/local/bin/pip3:$PATH"
I also did the same thing with python3:
which python3 and outputs, /usr/bin/python3
And then I used it to put in my path:
export PATH="/usr/bin/python3:$PATH"
However, for some reason my MacBook thinks to use python 2 and regular pip.
I want to be able to use pip3.

Why is pyinstaller not loading/executing

Whenever I try and use pyinstaller after installing it using pip install (on mac), I receive the following errors. Can someone help me resolve this. Use which pyinstaller finds the path, but trying to add to $PATH does not find it:
Traceback (most recent call last):
File "/usr/local/bin/pyinstaller", line 6, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3095, in <module>
#_call_aside
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3081, in _call_aside
f(*args, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3108, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 660, in _build_master
return cls._build_from_requirements(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 673, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 851, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (altgraph 0.10.2 (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python), Requirement.parse('altgraph>=0.15'), set(['macholib']))
This is the output of adding to $PATH:
$PATH=$PATH:/usr/local/bin/pyinstaller
-bash: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Applications/Wireshark.app/Contents/MacOS=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Applications/Wireshark.app/Contents/MacOS:/usr/local/bin/pyinstaller: No such file or directory
I got this same error... was able to solve it by installing an updated altgraph package under my user's python path. Hope this helps someone else that finds this page.
pip install --user altgraph==0.15

How to change the install path of pip

when used below command I get these errors
sudo pip install sqlalchemy
Traceback (most recent call last):
File "/usr/bin/pip", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line
3049, in <module>
#_call_aside
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line
3033, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line
3062, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line
660, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line
673, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py",
line 858, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pip==9.0.3' distribution was
not found and is required by the application
I then tried for pip version and got the below output
pip --version
pip 9.0.3 from /usr/lib/python3.4/dist-packages (python 3.4)
Creating environment variable PIP_TARGET can help or edit pip.conf file.
Another way is to use -t
sudo pip install sympy -t /path

When I put in pip --version into the terminal I get this error: "The 'pip==9.0.1' distribution was not found and is required by the application"

I put pip --version into the terminal and receive this:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3095, in <module>
#_call_aside
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3081, in _call_aside
f(*args, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3108, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 658, in _build_master
ws.require(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 959, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 846, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pip==9.0.1' distribution was not found and is required by the application
I'm using Mac
Executing:
sudo easy_install pip
should solve this issue.

I am unable to use EasyBlogger Python script with PyPandoc

Formerly I used googlecl, but it doesn1t work anymore due to authentication issues, google dropped OAuth1 support, or something. Then I tried EasyBlogger script to post blogposts from command line, but it proved very tricky: http://blog.rraghur.in/p/blog-page.html
I simply followed the steps on that page. First I had to install a package called Pandoc. It took about 3 weeks for me to finding out how to install it. Finally I managed to install it as a package pandoc-static for my Arch Linux box. Unfortunately easyblogger script still doesn't work, however I also installed a package called pypandoc from github:
When I run it with python2, I get error messages:
Traceback (most recent call last):
File "/usr/bin/easyblogger", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3074, in <module>
#_call_aside
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3060, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3087, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 645, in _build_master
ws.require(__requires__)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 946, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 833, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pypandoc' distribution was not found and is required by EasyBlogger
When I run it with python3, I get different error messages:
Traceback (most recent call last):
File "/usr/bin/easyblogger", line 9, in <module>
load_entry_point('EasyBlogger==0.9.0', 'console_scripts', 'easyblogger')()
File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
return ep.load()
File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2355, in load
return self.resolve()
File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2361, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3.4/site-packages/EasyBlogger-0.9.0-py3.4.egg/blogger/__init__.py", line 1, in <module>
ImportError: cannot import name 'EasyBlogger'
I really need some blogger script, because all of my blogs are out of order now for about 2 months.

Categories