While installing pip via get-pip.py faced this error, Any help on this will be appreciated.
C:\Python32>python get-pip.py
Traceback (most recent call last):
File "get-pip.py", line 20061, in <module>
main()
File "get-pip.py", line 194, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 82, in bootstrap
import pip
File "c:\users\kanika~1\appdata\local\temp\tmps55rv7\pip.zip\pip\__init__.py",
line 21, in <module>
File "c:\users\kanika~1\appdata\local\temp\tmps55rv7\pip.zip\pip\_vendor\requests\__init__.py", line 66, in <module>
File "c:\users\kanika~1\appdata\local\temp\tmps55rv7\pip.zip\pip\_vendor\requests\models.py", line 856
http_error_msg = u'%s Client Error: %s for url: %s' % (self.status_code, reason, self.url)
^
SyntaxError: invalid syntax
Related
I tried to install the pgi package in python but it won't let me and I get the following error:
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\javie\AppData\Local\Temp\pip-install-ebu1lkep\pgi_ba9aff7fc8974a6997ee57e6996d860c\setup.py", line 18, in <module>
import pgi
File "C:\Users\javie\AppData\Local\Temp\pip-install-ebu1lkep\pgi_ba9aff7fc8974a6997ee57e6996d860c\pgi\__init__.py", line 10, in <module>
from .importer import require_version, get_required_version
File "C:\Users\javie\AppData\Local\Temp\pip-install-ebu1lkep\pgi_ba9aff7fc8974a6997ee57e6996d860c\pgi\importer.py", line 15, in <module>
from .clib.gir import GIRepository
File "C:\Users\javie\AppData\Local\Temp\pip-install-ebu1lkep\pgi_ba9aff7fc8974a6997ee57e6996d860c\pgi\clib\gir\__init__.py", line 8, in <module>
from .giargument import GIArgument
File "C:\Users\javie\AppData\Local\Temp\pip-install-ebu1lkep\pgi_ba9aff7fc8974a6997ee57e6996d860c\pgi\clib\gir\giargument.py", line 9, in <module>
from ..glib import gboolean, gint8, guint8, gint16, guint16, gint32, guint32
File "C:\Users\javie\AppData\Local\Temp\pip-install-ebu1lkep\pgi_ba9aff7fc8974a6997ee57e6996d860c\pgi\clib\glib.py", line 16, in <module>
_glib = find_library("glib-2.0")
File "C:\Users\javie\AppData\Local\Temp\pip-install-ebu1lkep\pgi_ba9aff7fc8974a6997ee57e6996d860c\pgi\clib\_utils.py", line 99, in find_library
_internal[name] = cdll.LoadLibrary(_so_mapping[name])
File "C:\Users\javie\AppData\Local\Programs\Python\Python39\lib\ctypes\__init__.py", line 452, in LoadLibrary
return self._dlltype(name)
File "C:\Users\javie\AppData\Local\Programs\Python\Python39\lib\ctypes\__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'libglib-2.0-0.dll' (or one of its dependencies). Try using the full path with constructor syntax.
[end of output]
The command who i install:
pip install pgi
While using command pipenv shell to create virtual env for project it shows below error:
“Creating a virtualenv for this project...
Pipfile: /opt/fiware-env/ckan/Pipfile
Using /usr/bin/python3.5 (3.5.2) to create virtualenv...
✘ Failed creating virtual environment
[pipenv.exceptions.VirtualenvCreationException]: Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 174, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.5/runpy.py", line 133, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.5/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/usr/local/lib/python3.5/dist-packages/virtualenv/__init__.py", line 3, in <module>
from .run import cli_run, session_via_cli
File "/usr/local/lib/python3.5/dist-packages/virtualenv/run/__init__.py", line 13, in <module>
from .plugin.activators import ActivationSelector
File "/usr/local/lib/python3.5/dist-packages/virtualenv/run/plugin/activators.py", line 6, in <module>
from .base import ComponentBuilder
File "/usr/local/lib/python3.5/dist-packages/virtualenv/run/plugin/base.py", line 9, in <module>
from importlib_metadata import entry_points
File "/usr/local/lib/python3.5/dist-packages/importlib_metadata/__init__.py", line 88
dist: Optional['Distribution'] = None
^
SyntaxError: invalid syntax
Failed to create virtual environment.”
using python version 3.5.2
Any suggestions would be great. Thank you
I have installed IPython using the command:
python3.7 -m pip install ipython
And it gave the prompt of successful installation as well but when i try to open IPython using the command:
python3.7 -m IPython
(NOTE: using IPython instead of ipython because that's how it is stored in my system)
I am getting the following error:
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.7/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.7/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/usr/local/lib/python3.7/dist-packages/IPython/__init__.py", line 54, in <module>
from .core.application import Application
File "/usr/local/lib/python3.7/dist-packages/IPython/core/application.py", line 25, in <module>
from IPython.core import release, crashhandler
File "/usr/local/lib/python3.7/dist-packages/IPython/core/crashhandler.py", line 27, in <module>
from IPython.core import ultratb
File "/usr/local/lib/python3.7/dist-packages/IPython/core/ultratb.py", line 119, in <module>
from IPython.utils import path as util_path
File "/usr/local/lib/python3.7/dist-packages/IPython/utils/path.py", line 17, in <module>
from IPython.utils.process import system
File "/usr/local/lib/python3.7/dist-packages/IPython/utils/process.py", line 19, in <module>
from ._process_posix import system, getoutput, arg_split, check_pid
File "/usr/local/lib/python3.7/dist-packages/IPython/utils/_process_posix.py", line 23, in <module>
import pexpect
File "/usr/lib/python3/dist-packages/pexpect/__init__.py", line 75, in <module>
from .pty_spawn import spawn, spawnu
File "/usr/lib/python3/dist-packages/pexpect/pty_spawn.py", line 15, in <module>
from .spawnbase import SpawnBase
File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 218
def expect(self, pattern, timeout=-1, searchwindowsize=-1, async=False):
^
SyntaxError: invalid syntax
Download pexpect4.6 source code from https://github.com/pexpect/pexpect/releases/tag/4.6
Extract the source code, get into the folder and install the pexpect by:
sudo python3.7 setup.py install
This should solve your problem. :)
I have tried to initialise the tensorboard debugger via the following command
tensorboard --logdir summarytrain/ --debugger_port 7000
The output from this command is:
Traceback (most recent call last): File "c:\users\krisb\appdata\local\programs\python\python36\lib\site-packages\tensorboard\plugins\debugger\debugger_plugin_loader.py", line 79, in _ConstructDebuggerPluginWithGrpcPort from tensorboard.plugins.debugger import debugger_plugin as debugger_plugin_lib File "c:\users\krisb\appdata\local\programs\python\python36\lib\site-packages\tensorboard\plugins\debugger\debugger_plugin.py", line 36, in from tensorboard.plugins.debugger import debugger_server_lib File "c:\users\krisb\appdata\local\programs\python\python36\lib\site-packages\tensorboard\plugins\debugger\debugger_server_lib.py", line 33, in from tensorflow.python.debug.lib import grpc_debug_server File "c:\users\krisb\appdata\local\programs\python\python36\lib\site-packages\tensorflow\python\debug\lib\grpc_debug_server.py", line 27, in import grpc ModuleNotFoundError: No module named 'grpc' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "c:\users\krisb\appdata\local\programs\python\python36\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "c:\users\krisb\appdata\local\programs\python\python36\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\krisb\AppData\Local\Programs\Python\Python36\Scripts\tensorboard.exe__main__.py", line 9, in File "c:\users\krisb\appdata\local\programs\python\python36\lib\site-packages\tensorboard\main.py", line 36, in run_main tf.app.run(main) File "c:\users\krisb\appdata\local\programs\python\python36\lib\site-packages\tensorflow\python\platform\app.py", line 124, in run _sys.exit(main(argv)) File "c:\users\krisb\appdata\local\programs\python\python36\lib\site-packages\tensorboard\main.py", line 45, in main default.get_assets_zip_provider()) File "c:\users\krisb\appdata\local\programs\python\python36\lib\site-packages\tensorboard\program.py", line 165, in main tb = create_tb_app(plugins, assets_zip_provider) File "c:\users\krisb\appdata\local\programs\python\python36\lib\site-packages\tensorboard\program.py", line 199, in create_tb_app window_title=FLAGS.window_title) File "c:\users\krisb\appdata\local\programs\python\python36\lib\site-packages\tensorboard\backend\application.py", line 126, in standard_tensorboard_wsgi plugin_instances = [constructor(context) for constructor in plugins] File "c:\users\krisb\appdata\local\programs\python\python36\lib\site-packages\tensorboard\backend\application.py", line 126, in plugin_instances = [constructor(context) for constructor in plugins] File "c:\users\krisb\appdata\local\programs\python\python36\lib\site-packages\tensorboard\plugins\debugger\debugger_plugin_loader.py", line 87, in _ConstructDebuggerPluginWithGrpcPort err.message + AttributeError: 'ModuleNotFoundError' object has no attribute 'message'
I have tried to install GPRC via pip install gprc but i get the following error too
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\krisb\AppData\Local\Temp\pip-install-h7zjk7ly\grpc\
Totally stuck - anyone have any solutions?
Turns out the solution to this problem is to install
grpcio
Therefore enter
pip install grpcio
I'm trying to install twython, but keep getting errors.
First attempt:
pi#raspberrypi ~/twython $ sudo pip-3.2 install twython
Running setup.py egg_info for package requests
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/home/pi/twython/build/requests/setup.py", line 52, in <module>
exec(f.read(), about)
File "<string>", line 14
__cake__ = u'\u2728 \U0001f370 \u2728'
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/home/pi/twython/build/requests/setup.py", line 52, in <module>
exec(f.read(), about)
File "<string>", line 14
__cake__ = u'\u2728 \U0001f370 \u2728'
^
SyntaxError: invalid syntax
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /home/pi/twython/build/requests
Next I searched on the last line of the error and followed some suggestions that said to make sure setuptools and ez_install were installed and up to date, but that didn't help.
Then I followed the backup instructions on ReadtheDocs that said to try to install it this way:
git clone git://github.com/ryanmcgrath/twython.git
cd twython
sudo python3 setup.py install
but it failed again:
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 640, in install_item
self.process_distribution(spec, dist, deps)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 692, in process_distribution
[requirement], self.local_index, self.easy_install
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 576, in resolve
dist = best[req.key] = env.best_match(req, self, installer)
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 822, in best_match
return self.obtain(req, installer) # try and download/install
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 834, in obtain
return installer(requirement)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 608, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 638, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 828, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1105, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1094, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 31, in run_setup
lambda: exec(compile(open(
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 73, in run
return func()
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 34, in <lambda>
{'__file__':setup_script, '__name__':'__main__'})
File "setup.py", line 52, in <module>
Error in atexit._run_exitfuncs:
TypeError: 'NoneType' object is not callable
It turns out that Twython cannot work with Python v3.2 because it depends on the requests module which apparently is not supported in Python 3.2.
One of the developers of Twython just explained this to me on Twitter.