I am unable to use EasyBlogger Python script with PyPandoc - python

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.

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.

Python SourceDefender ImportError

I have been trying to get sourcedefender (https://pypi.org/project/sourcedefender/) to work on a laptop running PiDesktop and and windows 7 machine both with the same issue. PiDesktop is running python 3.7 and the windows machine is running Python 3.8.
Both come back with
ImportError: cannot import name 'loader' from 'sourcedefender'
D:\Python Stuff>sourcedefender encrypt test_stuff.py
Traceback (most recent call last):
File "C:\Users\adam.hedley\AppData\Local\Programs\Python\Python38\Scripts\sourcedefender-script.py", line 11, in <module>
load_entry_point('sourcedefender==6.0.21', 'console_scripts', 'sourcedefender')()
File "C:\Users\adam.hedley\AppData\Local\Programs\Python\Python38\lib\site-packages\pkg_resources\__init__.py", line 490, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "C:\Users\adam.hedley\AppData\Local\Programs\Python\Python38\lib\site-packages\pkg_resources\__init__.py", line 2862, in load_entry_point
return ep.load()
File "C:\Users\adam.hedley\AppData\Local\Programs\Python\Python38\lib\site-packages\pkg_resources\__init__.py", line 2462, in load
return self.resolve()
File "C:\Users\adam.hedley\AppData\Local\Programs\Python\Python38\lib\site-packages\pkg_resources\__init__.py", line 2468, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "<frozen zipimport>", line 259, in load_module
File "C:\Users\adam.hedley\AppData\Local\Programs\Python\Python38\lib\site-packages\sourcedefender-6.0.21-py3.8.egg\sourcedefender\__init__.py", lin
e 3, in <module>
ImportError: cannot import name 'loader' from 'sourcedefender' (C:\Users\adam.hedley\AppData\Local\Programs\Python\Python38\lib\site-packages\sourcede
fender-6.0.21-py3.8.egg\sourcedefender\__init__.py)
Exactly the same result if I also try sourcedefender encrypt --ttl=1d test_stuff.py
I am hoping someone may have a simple solution.

Mopidy Installation Error

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

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.

pip version conflict and unable to install packages in python2.7.6 & 3.4.3

When I was trying to install any packages using pip and pip3 I got below error:
Also tried to remove and reinstall pip, but got same error.any idea how to solve this.
Thanks in advance.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 444, in _build_master
ws.require(__requires__)
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 725, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 632, in resolve
raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (pip 9.0.1 (/usr/local/lib/python3.4/dist-packages), Requirement.parse('pip==1.5.4'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/pip3", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2749, in <module>
working_set = WorkingSet._build_master()
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 446, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 459, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 628, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pip==1.5.4

Categories