I've tried
pip install radiopy
Traceback:
C:\Users\олег\Downloads>pip install radiopy
Collecting radiopy
Using cached radio
py-0.6.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\29F0~1\AppData\Local\Temp\pip-build-blxa2oob\radiopy\setup.py, line 23, in <module>
version=get_version('radio.py'),
File "C:\Users\29F0~1\AppData\Local\Temp\pip-build-blxa2oob\radiopy\setup.py
return __version__
NameError: name '__version__' is not defined
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\29F0~1\AppData\Local\Temp\pip-build-blxa2oob\radiopy\
I've also tried:
easy_install radiopy
Traceback:
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 168, in save_modules
saved_exc.resume()
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 143, in resume
six.reraise(type, exc, self._tb)
File "c:\python34\lib\site-packages\pkg_resources\_vendor\six.py", line 685, in reraise
raise value.with_traceback(tb)
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 156, in save_modules
yield saved
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 197, in setup_context yield
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 246, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 276, in run return func()
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 245, in runner
_execfile(setup_script, ns)
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 47, in _execfile
exec(code, globals, locals)
File "C:\Users\29F0~1\AppData\Local\Temp\easy_install-laprrvio\radiopy-0.6\setup.py", line 23, in <module>
File "C:\Users\29F0~1\AppData\Local\Temp\easy_install-laprrvio\radiopy-0.6\setup.py", line 19, in get_version
NameError: name '__version__' is not defined
Lately,
C:\Users\олег>pip install C:\\Users\\олег\\Downloads\\radiopy-0.6.tar.gz
Traceback:
C:\Users\олег>pip install C:\\Users\\олег\\Downloads\\radiopy-0.6.tar.gz
Processing c:\users\олег\downloads\radiopy-0.6.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\29F0~1\AppData\Local\Temp\pip-8evw0uk0-build\setup.py", line 23, in <module>
version=get_version('radio.py'),
File "C:\Users\29F0~1\AppData\Local\Temp\pip-8evw0uk0-build\setup.py", line 19, in get_version
return __version__
NameError: name '__version__' is not defined
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\29F0~1\AppData\Local\Temp\pip-8evw0uk0-build\
How can I solve this?
The module seems to support Python 2 only. The setup.py contains a very dubious hack to evaluate the __version__ variable:
def get_version(filename):
"""Extract __version__ from file by parsing it."""
with open(filename) as fp:
for line in fp:
if line.startswith('__version__'):
exec(line)
return __version__
What this does is to find a line that starts with __version__, namely __version__ = '0.6', and then execute it as dynamic code with exec, which works. However in Python 3 this doesn't modify local variables and thus __version__ is not defined on the next line.
Even if you fixed this bug, you'd met a countless others as the package is not Python-3-ready at all. The easiest solution would be to use Python 2. But even then I am not too sure if this works correctly on Windows as it is written for the mplayer/mencoder suite, and seems to be very Linux/POSIX minded in its code.
Related
I keep trying to install the win32core so virtualbox will stop yelling at me when I run the install, but after running "pip install win32core" (which I was informed should work) it returned all this:
Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [19 lines of output]
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 351, in <module>
main()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 333, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\[my user]\AppData\Local\Temp\pip-build-env-dnb2bcv9\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "C:\Users\[my user]\AppData\Local\Temp\pip-build-env-dnb2bcv9\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in _get_build_requires
self.run_setup()
File "C:\Users\[my user]\AppData\Local\Temp\pip-build-env-dnb2bcv9\overlay\Lib\site-packages\setuptools\build_meta.py", line 484, in run_setup
super(_BuildMetaLegacyBackend,
File "C:\Users\[my user]\AppData\Local\Temp\pip-build-env-dnb2bcv9\overlay\Lib\site-packages\setuptools\build_meta.py", line 335, in run_setup
exec(code, locals())
File "<string>", line 56, in <module>
File "C:\Users\[my user]\AppData\Local\Temp\pip-install-ddycyrfm\win32core_958a160db78445ecbd19f6afc5f87336\win32\distutils\util.py", line 51, in collect_extensions
cfg = yaml.load(fh)
TypeError: load() missing 1 required positional argument: 'Loader'
The issue is I don't completely understand how to fix this, because I'm more new to getting stuff like this working.
It also spits out a little note:
note: This error originates from a subprocess, and is likely not a problem with pip.
I've tried digging in other forums, never came up with actual answers.
I am trying to install a software called grizli (https://github.com/gbrammer/grizli/) in a conda environment. In one step I have to install another software called drizzle (https://github.com/gbrammer/drizzle.git). Thís installation always results in a RecursionError. As explained in the installation instructions I run
pip install git+https://github.com/gbrammer/drizzle.git
resulting in
Collecting git+https://github.com/gbrammer/drizzle.git
Cloning https://github.com/gbrammer/drizzle.git to /tmp/pip-req-build-ncjb9u8_
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-ncjb9u8_/setup.py", line 61, in <module>
cmdclassd = register_commands(PACKAGENAME, VERSION, RELEASE)
File "/tmp/pip-req-build-ncjb9u8_/astropy_helpers/astropy_helpers/setup_helpers.py", line 140, in register_commands
from .commands.build_sphinx import AstropyBuildSphinx, AstropyBuildDocs
File "/tmp/pip-req-build-ncjb9u8_/astropy_helpers/astropy_helpers/commands/build_sphinx.py", line 16, in <module>
from sphinx.setup_command import BuildDoc as SphinxBuildDoc
File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/site-packages/sphinx/setup_command.py", line 23, in <module>
from sphinx.application import Sphinx
File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/site-packages/sphinx/application.py", line 34, in <module>
from sphinx.environment import BuildEnvironment
File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/site-packages/sphinx/environment/__init__.py", line 38, in <module>
from sphinx.util.websupport import is_commentable
File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/site-packages/sphinx/util/websupport.py", line 11, in <module>
from sphinxcontrib.websupport.utils import is_commentable # NOQA
File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/site-packages/sphinxcontrib/websupport/__init__.py", line 15, in <module>
from sphinxcontrib.websupport.core import WebSupport # NOQA
File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/site-packages/sphinxcontrib/websupport/core.py", line 17, in <module>
from jinja2 import Environment, FileSystemLoader
File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/site-packages/jinja2/__init__.py", line 33, in <module>
from jinja2.environment import Environment, Template
File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/site-packages/jinja2/environment.py", line 15, in <module>
from jinja2 import nodes
File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/site-packages/jinja2/nodes.py", line 19, in <module>
from jinja2.utils import Markup
File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/site-packages/jinja2/utils.py", line 486, in <module>
MutableMapping.register(LRUCache)
File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/abc.py", line 158, in register
if issubclass(subclass, cls):
File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/abc.py", line 209, in __subclasscheck__
ok = cls.__subclasshook__(subclass)
File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/typing.py", line 884, in __extrahook__
if issubclass(subclass, scls):
File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/typing.py", line 1154, in __subclasscheck__
return super().__subclasscheck__(cls)
File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/abc.py", line 209, in __subclasscheck__
ok = cls.__subclasshook__(subclass)
File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/typing.py", line 884, in __extrahook__
if issubclass(subclass, scls):
File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/typing.py", line 1154, in __subclasscheck__
return super().__subclasscheck__(cls)
...
...
...
File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/abc.py", line 209, in __subclasscheck__
ok = cls.__subclasshook__(subclass)
File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/typing.py", line 884, in __extrahook__
if issubclass(subclass, scls):
File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/typing.py", line 1154, in __subclasscheck__
return super().__subclasscheck__(cls)
File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/abc.py", line 209, in __subclasscheck__
ok = cls.__subclasshook__(subclass)
File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/typing.py", line 884, in __extrahook__
if issubclass(subclass, scls):
File "/home/username/anaconda3/envs/grizli-dev/lib/python3.6/typing.py", line 1154, in __subclasscheck__
return super().__subclasscheck__(cls)
RecursionError: maximum recursion depth exceeded while calling a Python object
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-ncjb9u8_/
The three points in the code stand for the repetition of the three lines that always appear in the same order and probably cause the RecursionError.
I have already tried different pip versions but it didn't change anything. Does anybody have an idea?
I just got the same issue. The only solution that worked for me was to downgrade sphinx to a version <=1.5.6 as mentioned here: https://github.com/ericmandel/pyds9/issues/53 (note that I already had astro-helpers >=2.0 when I got the issue, so the solution is on downgrading sphinx)
Just do: pip install sphinx==1.5.6
and then hopefully drizzle will install correctly.
I am trying to run sklearn, which I can import in Python 2.7.11, but
there was an installation problem. I tried going to /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sklearn and ran
python setup.py install
and got into some apparently Cython related issues:
Traceback (most recent call last):
File "setup.py", line 88, in <module>
setup(**configuration(top_path='').todict())
File "setup.py", line 82, in configuration
maybe_cythonize_extensions(top_path, config)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sklearn/_build_utils/__init__.py", line 84, in maybe_cythonize_extensions
config.ext_modules = cythonize(config.ext_modules)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 908, in cythonize
aliases=aliases)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 778, in create_extension_list
for file in nonempty(sorted(extended_iglob(filepattern)), "'%s' doesn't match any files" % filepattern):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 124, in nonempty
raise ValueError(error_msg)
ValueError: '_check_build.pyx' doesn't match any files
Does anyone have an idea as to what the issue might be?
Thanks,
I tried various ways (every solution mentioned in the stackoverflow) to solve the problem but still the problems continues.
When I run : "python manage.py migrate" the following error is shown
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/Manish/Projects/Websites/SanirTVNetwork/SanirTV/lib/python2.7/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
utility.execute()
File "/Manish/Projects/Websites/SanirTVNetwork/SanirTV/lib/python2.7/site-packages/django/core/management/__init__.py", line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Manish/Projects/Websites/SanirTVNetwork/SanirTV/lib/python2.7/site-packages/django/core/management/base.py", line 305, in run_from_argv
self.execute(*args, **cmd_options)
File "/Manish/Projects/Websites/SanirTVNetwork/SanirTV/lib/python2.7/site-packages/django/core/management/base.py", line 353, in execute
self.check()
File "/Manish/Projects/Websites/SanirTVNetwork/SanirTV/lib/python2.7/site-packages/django/core/management/base.py", line 385, in check
include_deployment_checks=include_deployment_checks,
File "/Manish/Projects/Websites/SanirTVNetwork/SanirTV/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 61, in _run_checks
issues = run_checks(tags=[Tags.database])
File "/Manish/Projects/Websites/SanirTVNetwork/SanirTV/lib/python2.7/site-packages/django/core/checks/registry.py", line 81, in run_checks
new_errors = check(app_configs=app_configs)
File "/Manish/Projects/Websites/SanirTVNetwork/SanirTV/lib/python2.7/site-packages/django/core/checks/database.py", line 9, in check_database_backends
for conn in connections.all():
File "/Manish/Projects/Websites/SanirTVNetwork/SanirTV/lib/python2.7/site-packages/django/db/utils.py", line 226, in all
return [self[alias] for alias in self]
File "/Manish/Projects/Websites/SanirTVNetwork/SanirTV/lib/python2.7/site-packages/django/db/utils.py", line 211, in __getitem__
backend = load_backend(db['ENGINE'])
File "/Manish/Projects/Websites/SanirTVNetwork/SanirTV/lib/python2.7/site-packages/django/db/utils.py", line 115, in load_backend
return import_module('%s.base' % backend_name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/Manish/Projects/Websites/SanirTVNetwork/SanirTV/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 28, in <module>
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb
Then I tried: "pip install mysql-python" as per the suggestions in the stackoverflow similar questions. I got the following error
Collecting mysql-python
Using cached MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/7_/cx21vvvn5cqdypfndc7j_jl80000gn/T/pip-build-JjMQeR/mysql-python/setup.py", line 17, in <module>
metadata, options = get_config()
File "setup_posix.py", line 53, in get_config
libraries = [ dequote(i[2:]) for i in libs if i.startswith(compiler_flag("l")) ]
File "setup_posix.py", line 8, in dequote
if s[0] in "\"'" and s[0] == s[-1]:
IndexError: string index out of range
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/7_/cx21vvvn5cqdypfndc7j_jl80000gn/T/pip-build-JjMQeR/mysql-python/
I even tried: "brew install mysql-connector-c" but the same error starts to come.
I finally did it:
First I installed the command line developer tools required by running the following code inside the virtualenv
$ xcode-select --install
Then I installed MySQL-python by using the following code
pip install MySQL-python
Finally I migrated the database using:
python manage.py migrate
It worked without any errors
The main problem with the error was that I didn't installed the command line developer tools required.
I have had this error for a year now and still can't find a solution. I am using Linux Mint 17.3 Every time I try to install something using pip, I get a bunch of exceptions.
$ pip install -U scikit-learns
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 272, in run
with self._build_session(options) as session:
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 72, in _build_session
insecure_hosts=options.trusted_hosts,
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/download.py", line 329, in __init__
self.headers["User-Agent"] = user_agent()
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/download.py", line 93, in user_agent
from pip._vendor import distro
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/_vendor/distro.py", line 1050, in <module>
_distro = LinuxDistribution()
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/_vendor/distro.py", line 594, in __init__
if include_lsb else {}
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/_vendor/distro.py", line 933, in _get_lsb_release_info
raise subprocess.CalledProcessError(code, cmd, stdout)
CalledProcessError: Command 'lsb_release -a' returned non-zero exit status 1
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==9.0.1', 'console_scripts', 'pip')()
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/__init__.py", line 233, in main
return command.main(cmd_args)
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 251, in main
timeout=min(5, options.timeout)) as session:
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 72, in _build_session
insecure_hosts=options.trusted_hosts,
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/download.py", line 329, in __init__
self.headers["User-Agent"] = user_agent()
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/download.py", line 93, in user_agent
from pip._vendor import distro
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/_vendor/distro.py", line 1050, in <module>
_distro = LinuxDistribution()
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/_vendor/distro.py", line 594, in __init__
if include_lsb else {}
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/_vendor/distro.py", line 933, in _get_lsb_release_info
raise subprocess.CalledProcessError(code, cmd, stdout)
subprocess.CalledProcessError: Command 'lsb_release -a' returned non-zero exit status 1
The "Command 'lsb_release -a' returned non-zero exit status 1" always popped up. I have installed multiple versions of python and tried deleting them manually and it still comes up with the same error.
If you can't help me solve this error, how can I uninstall all python files?
When I update Python and pip,I had the problem like this
your can run lsb_release, if your run shell: #lsb_release
It work like:
Traceback (most recent call last): File "/usr/bin/lsb_release", line
28, in import lsb_release ImportError: No module named
'lsb_release'
You can change file (/usr/bin/lsb_release) so the shebang changes from:
#! /usr/bin/python -Es
to:
#! /usr/bin/python2 -Es
where you specify the path /usr/bin/python2 to the old Python binary.