ipython won't run on Windows - python

After installing ipython on Windows via pip install ipython, I am unable to run it and receive the following error.
> ipython
Traceback (most recent call last):
File "C:\Python27\scripts\ipython-script.py", line 5, in <module>
from pkg_resources import load_entry_point
File "C:\Python27\lib\site-packages\pkg_resources.py", line 2607, in <module>
parse_requirements(__requires__), Environment()
File "C:\Python27\lib\site-packages\pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: pyreadline>=1.7.1
pyreadline was installed when ipython was via pip, but pip freeze shows warnings about the SVN location
> pip freeze
Warning: cannot find svn location for pyreadline==1.7.1.dev-r0
...
ipython==0.13.1
## FIXME: could not find svn URL in dependency_links for this package:
pyreadline==1.7.1.dev-r0
...

The solution was to uninstall the version of pyreadline pulled when ipython was installed (pip uninstall pyreadline) and download and install pyreadline-1.7.1.win32-py2.7.‌exe from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyreadline

Related

can't launch tensorboard from mac terminal

problem: I can't run "tensorboard --logdir=summaries" in my terminal because I get this error
system: macbook pro running Catalina
environment: running pyenv with python3 as global
package: I have tensorflow 2.2.0 installed via pip
I have setuptools 49.1.0
Traceback (most recent call last):
File "/usr/local/bin/tensorboard", line 10, in
sys.exit(run_main())
File "/Library/Python/3.7/site-packages/tensorboard/main.py", line 65, in run_main
default.get_plugins() + default.get_dynamic_plugins(),
File "/Library/Python/3.7/site-packages/tensorboard/default.py", line 125, in get_dynamic_plugins
"tensorboard_plugins"
File "/Library/Python/3.7/site-packages/tensorboard/default.py", line 124, in
for entry_point in pkg_resources.iter_entry_points(
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/init.py", line 2410, in load
self.require(*args, **kwargs)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/init.py", line 2433, in require
items = working_set.resolve(reqs, env, installer, extras=self.extras)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/init.py", line 791, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (setuptools 40.8.0 (/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages), Requirement.parse('setuptools>=41.0.0'))
the setuptools version you have is 40.8.0.
tensorboard needs setuptools>=41.0.0.
So there are two solutions:
update setuptools to >=41.0.0
create a new environment with setuptools>=41.0.0.
MacOs may not allow you to update setuptools, due to system integrity protection
Adding --user python to the command allowed this to work.
In other words
pip install --upgrade setuptools --user python
As it turns out I was not using Pyenv correctly. Once I used "pyenv global system" then I was able to update the pip packages correctly and the right setuptools was installed and TensorBoard ran as expected

pip installing eyeD3 module. Failed to find libmagic

Trying to install eyed3 but it's giving me this error:
>>> import eyed3
Traceback (most recent call last):
File "<pyshell#8>", line 1, in <module>
import eyed3
File "C:\Users\Dylan\AppData\Local\Programs\Python\Python35-32\lib\site-packages\eyed3\__init__.py", line 35, in <module>
from .utils.log import log # noqa
File "C:\Users\Dylan\AppData\Local\Programs\Python\Python35-32\lib\site-packages\eyed3\utils\__init__.py", line 27, in <module>
import magic
File "C:\Users\Dylan\AppData\Local\Programs\Python\Python35-32\lib\site-packages\magic.py", line 176, in <module>
raise ImportError('failed to find libmagic. Check your installation')
ImportError: failed to find libmagic. Check your installation
Here's the pip install:
I tried to uninstall with pip and delete all the eyed3 files, then re-install and it still gave the same error. It also does the same thing with easy_install.
On Windows
You'll need DLLs for libmagic. #julian-r has uploaded a version of this project that includes binaries to pypi: https://pypi.python.org/pypi/python-magic-bin/0.4.14
pip install python-magic-bin==0.4.14
Works for me.
I fixed it by installing libmagic with this command
brew install libmagic
You need to install libmagic before you install eye3d.
Here is a link to the git.
https://github.com/ahupp/python-magic#dependencies
You can use this to install it:
pip install python-magic

Having trouble installing buildslave on Windows 7

I finally got pip install buildbot-slave to work on Win7 (thanks to another answer on this site), and now when I attempt to create a build slave via:
buildslave create-slave slavefolder blah.blah.com:9989 buildslave password
It kicks back the following error:
Traceback (most recent call last):
File "C:\Python27\Scripts\buildslave", line 3, in <module>
from buildslave.scripts import runner
File "C:\Python27\lib\site-packages\buildslave\scripts\runner.py", line 22, in <module>
from twisted.python import reflect
File "C:\Python27\lib\site-packages\twisted\__init__.py", line 53, in <module>
_checkRequirements()
File "C:\Python27\lib\site-packages\twisted\__init__.py", line 37, in _checkRequirements
raise ImportError(required + ": no module named zope.interface.")
ImportError: Twisted requires zope.interface 3.6.0 or later: no module named zope.interface.
I've got it all installed here is my pip freeze:
Twisted==14.0.0
argparse==1.2.1
buildbot-slave==0.8.9
stevedore==0.15
virtualenv==1.9.1
virtualenv-clone==0.2.5
virtualenvwrapper==4.3.1
virtualenvwrapper-win==1.1.5
zope.interface==4.1.1
Any recommendations would be greatly appreciated.
Try to uninstall zope.interface and reinstall the version 3.6.0 using the command
pip uninstall zope.interface
pip install zope.interface==3.6.0
Hope this helps.

python nosetests won't work

I was learning Python from 'learning python the hard way' and I was stuck at exercise 46 (http://learnpythonthehardway.org/book/ex46.html).
I installed pip and then the nose package and whenever i run nosetest now as in the example it doesn't work. This is the error I get:
Traceback (most recent call last):
File "/usr/local/bin/nosetests", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2807, in <module>
parse_requirements(__requires__), Environment()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 594, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: nose==1.3.0
I googled about this but couldn't find an answer.
I am on a Lubuntu 13.04 desktop.
You need to install a version of nose equal to 1.3.0 (maybe the nose version that you installed is not 1.3.0?)
You can find out what version of nose you have installed with
>>> import nose
>>> nose.__version__
'1.3.0'
Using pip this is as simple as (if you already have nose installed then you will want to use the --upgrade flag)
pip install --upgrade nose==1.3.0
or even direct from the website
pip install -Iv https://pypi.python.org/packages/source/n/nose/nose-1.3.0.tar.gz#md5=95d6d32b9d6b029c3c65674bd9e7eabe

getting error distributionNotFound

I have installed celeryD and redis on my system. when i am running the command using celery. iam getting the following error.
Traceback (most recent call last):
File "/usr/local/bin/celeryd", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2711, in <module>
parse_requirements(__requires__), Environment()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 584, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: python-dateutil>=1.5,<2.0
what may be the possible reason??
There's a package called python-dateutil that isn't installed.
It should be available on the PYTHONPATH that's active when you call celeryd.
Python dateutil is installable from PyPi.
Assuming you have pip installed on your system, you can do so with this command:
$ pip install python-dateutil==1.5

Categories

Resources