poetry install fails with [CalledProcessError] while installing github submodule - python-3.x

I'm new to python and github. when I'm trying to install few submodules getting below error.
I'm using git bash on windows
pip is at latest version 20.2.3.
able to install other submodules using poetry successfully
$ poetry install -vvv
Using virtualenv: E:\Dev\venv\venv_test
Installing dependencies from lock file
[CalledProcessError]
Command '['C:\\Users\\88810\\AppData\\Local\\Temp\\tziwqwewd56\\Scripts\\python.exe', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 3221226505.
Traceback (most recent call last):
File "C:\Users\88810\.poetry\lib\poetry\_vendor\py3.6\clikit\console_application.py", line 131, in run
status_code = command.handle(parsed_args, io)
File "C:\Users\88810\.poetry\lib\poetry\_vendor\py3.6\clikit\api\command\command.py", line 120, in handle
status_code = self._do_handle(args, io)
File "C:\Users\88810\.poetry\lib\poetry\_vendor\py3.6\clikit\api\command\command.py", line 171, in _do_handle
return getattr(handler, handler_method)(args, io, self)
File "C:\Users\88810\.poetry\lib\poetry\_vendor\py3.6\cleo\commands\command.py", line 92, in wrap_handle
return self.handle()
File "C:\Users\88810\.poetry\lib\poetry\console\commands\install.py", line 69, in handle
return_code = installer.run()
File "C:\Users\88810\.poetry\lib\poetry\installation\installer.py", line 74, in run
self._do_install(local_repo)
File "C:\Users\88810\.poetry\lib\poetry\installation\installer.py", line 225, in _do_install
ops = solver.solve(use_latest=whitelist)
File "C:\Users\88810\.poetry\lib\poetry\puzzle\solver.py", line 36, in solve
packages, depths = self._solve(use_latest=use_latest)
File "C:\Users\88810\.poetry\lib\poetry\puzzle\solver.py", line 181, in _solve
self._package, self._provider, locked=locked, use_latest=use_latest
File "C:\Users\88810\.poetry\lib\poetry\mixology\__init__.py", line 7, in resolve_version
return solver.solve()
File "C:\Users\88810\.poetry\lib\poetry\mixology\version_solver.py", line 80, in solve
next = self._choose_package_version()
File "C:\Users\88810\.poetry\lib\poetry\mixology\version_solver.py", line 388, in _choose_package_version
version = self._provider.complete_package(version)
File "C:\Users\88810\.poetry\lib\poetry\puzzle\provider.py", line 601, in complete_package
self.search_for_vcs(r)
File "C:\Users\88810\.poetry\lib\poetry\puzzle\provider.py", line 175, in search_for_vcs
name=dependency.name,
File "C:\Users\88810\.poetry\lib\poetry\puzzle\provider.py", line 213, in get_package_from_vcs
package = cls.get_package_from_directory(tmp_dir, name=name)
File "C:\Users\88810\.poetry\lib\poetry\puzzle\provider.py", line 361, in get_package_from_directory
cls._execute_setup()
File "C:\Users\88810\.poetry\lib\poetry\puzzle\provider.py", line 872, in _execute_setup
EnvManager.build_venv(tmp_dir)
File "C:\Users\88810\.poetry\lib\poetry\utils\env.py", line 688, in build_venv
builder.create(str(path))
File "E:\python36\lib\venv\__init__.py", line 67, in create
self._setup_pip(context)
File "E:\python36\lib\venv\__init__.py", line 245, in _setup_pip
subprocess.check_output(cmd, stderr=subprocess.STDOUT)
File "E:\python36\lib\subprocess.py", line 336, in check_output
**kwargs).stdout
File "C:\Users\88810\.poetry\lib\poetry\utils\_compat.py", line 206, in run
retcode, process.args, output=stdout, stderr=stderr
(venv_test)

I was able to resolve the issue after following these steps:
Upgraded python 3.6 to 3.7.4.
I had earlier installed python on E drive, installed it on C drive.

Related

Can't install django with pipenv although it is installed and identified by the command prompt

I've been trying to set up a virtual environment for django using pipenv. I've installed pipenv and configured the path properly. When I run the following command
pipenv --version
I get
pipenv, version 2022.9.8
Which implies that pipenv is working.
But when I attempt to install django with the following command
pipenv install django
I get the following error.
C:\Users\Saifia>pipenv install django
Traceback (most recent call last):
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 620, in parse_executable
result_version = get_python_version(path)
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\pythonfinder\utils.py", line 97, in get_python_version
c = subprocess.Popen(version_cmd, **subprocess_kwargs)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts\pipenv.exe\__main__.py", line 7, in <module>
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\click\core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\cli\options.py", line 57, in main
return super().main(*args, **kwargs, windows_expand_args=False)
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\click\core.py", line 1053, in main
rv = self.invoke(ctx)
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\click\core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\click\core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\click\core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\click\decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\click\core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\cli\command.py", line 236, in install
do_install(
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\core.py", line 2056, in do_install
ensure_project(
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\core.py", line 526, in ensure_project
ensure_virtualenv(
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\core.py", line 447, in ensure_virtualenv
python = ensure_python(project, three=three, python=python)
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\core.py", line 336, in ensure_python
path_to_python = find_a_system_python(python)
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\core.py", line 302, in find_a_system_python
return next(iter(finder.find_all_python_versions()), None)
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 307, in find_all_python_versions
python_version_dict = getattr(self.system_path, "python_version_dict", {})
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 115, in system_path
self._system_path = self.create_system_path()
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 77, in create_system_path
return pyfinder_path.SystemPath.create(
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 696, in create
instance = instance._run_setup()
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 247, in _run_setup
new_instance = new_instance._setup_windows()
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 425, in _setup_windows
windows_finder = WindowsFinder.create()
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\pythonfinder\models\windows.py", line 149, in create
return cls()
File "<attrs generated init pythonfinder.models.windows.WindowsFinder>", line 13, in __init__
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\pythonfinder\models\windows.py", line 116, in get_versions
versions[py_version.version_tuple[:5]] = base_dir
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 367, in __getattribute__
result = super(PythonVersion, self).__getattribute__(key)
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 432, in version_tuple
self.patch,
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 377, in __getattribute__
instance_dict = self.parse_executable(executable)
File "C:\Users\Saifia\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 622, in parse_executable
raise ValueError("Not a valid python path: %r" % path)
ValueError: Not a valid python path: 'C:/Users/Saifia/anaconda3/Scripts/python.exe'
I've been trying to figure this out the whole day and have tried various things but I'm new this and I can't figure out my mistake.
Any help will be greatly appreciated!
I was using virtualenv for virtualization and had to use pipenv to follow a tutorial and could not get pipenv to work. I had to uninstall virtualenv and pipenv and reinstall pipenv for it to work. I am still using pipenv but I do not like it virtualenv works better for me.
I think that the key to your problem is the last message in the traceback:
"ValueError: Not a valid python path: 'C:/Users/Saifia/anaconda3/Scripts/python.exe'"
Check and see if this file exists at this location.
If not, your default python version isn't set correctly in pipenv.
Deactivate any virtual environment and check your python version before you install pipenv.

related initializing remo after installation ,for building image-annotation-web-app

i had installed it through :
pip install remo
then i tried to initialize it through :
python -m remo_app init
but an error is showing of installing postgres even after installing it manually
i also tried with different versions but in vain
the error was:
C:\Users\Admin>python -m remo_app init
===============================================
((
(>’:’) Remo: v0.4.5
Python: 3.8.1, Windows-10-10.0.18362-SP0
Initiailizing Remo:
This will download and install the following packages as needed:
vips
postgres
scoop
git
unzip
aria2
Do you want to continue? [Y/n]: y
[-] Installing vips lib
[-] Installing postgres
Traceback (most recent call last):
File “C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\runpy.py”, line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File “C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\runpy.py”, line 86, in run_code
exec(code, run_globals)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\remo_app_main.py", line 3, in
app()
File “C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\typer\main.py”, line 211, in call
return get_command(self)()
File “C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\click\core.py”, line 829, in call
return self.main(*args, **kwargs)
File “C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\click\core.py”, line 782, in main
rv = self.invoke(ctx)
File “C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\click\core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\click\core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\click\core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\typer\main.py”, line 494, in wrapper
return callback(**use_params) # type: ignore
File “C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\remo_app\cmd\cmd.py”, line 55, in init
db_config = installer.install(postgres=postgres.get_instance())
File “C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\remo_app\cmd\installer.py”, line 333, in install
return postgres.install()
File “C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\remo_app\cmd\installer.py”, line 212, in install
if not self._is_installed():
File “C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\remo_app\cmd\postgres.py”, line 55, in _is_installed
self._set_env_vars()
File “C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\site-packages\remo_app\cmd\postgres.py”, line 91, in _set_env_vars
if not os.path.exists(os.getenv(‘PGDATA’)):
File “C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\genericpath.py”, line 19, in exists
os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
This is an issue with Remo. Take a look here:
https://support.remo.ai/
and see there are two threads about installation problems on Windows.

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-fkyx6m64/misaka/

I am using django 1.11 on fedora25. I am using virtual environment and while trying to install misaka:
pip install misaka
I got the following error:
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-fkyx6m64/misaka/
Here is the traceback:
Collecting django-misaka
Downloading django-misaka-0.2.1.tar.gz
Collecting houdini.py (from django-misaka)
Downloading houdini.py-0.1.0.tar.gz
Collecting misaka (from django-misaka)
Downloading misaka-2.1.0.tar.gz (127kB)
100% |████████████████████████████████| 133kB 317kB/s
Complete output from command python setup.py egg_info:
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory
gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory
No working compiler found, or bogus compiler options
passed to the compiler from Python's distutils module.
See the error messages above.
(If they are about -mno-fused-madd and you are on OS/X 10.8,
see http://stackoverflow.com/questions/22313407/ .)
Traceback (most recent call last):
File "/usr/lib/python3.5/site-packages/setuptools/sandbox.py", line 156, in save_modules
yield saved
File "/usr/lib/python3.5/site-packages/setuptools/sandbox.py", line 197, in setup_context
yield
File "/usr/lib/python3.5/site-packages/setuptools/sandbox.py", line 246, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/lib/python3.5/site-packages/setuptools/sandbox.py", line 276, in run
return func()
File "/usr/lib/python3.5/site-packages/setuptools/sandbox.py", line 245, in runner
_execfile(setup_script, ns)
File "/usr/lib/python3.5/site-packages/setuptools/sandbox.py", line 47, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-j_v6nkgj/cffi-1.10.0/setup.py", line 135, in <module>
File "/tmp/easy_install-j_v6nkgj/cffi-1.10.0/setup.py", line 70, in ask_supports_thread
'Topic :: Text Processing :: Markup',
File "/tmp/easy_install-j_v6nkgj/cffi-1.10.0/setup.py", line 52, in no_working_compiler_found
packages=['misaka'],
SystemExit: 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 1099, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python3.5/site-packages/setuptools/sandbox.py", line 249, in run_setup
raise
File "/usr/lib64/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python3.5/site-packages/setuptools/sandbox.py", line 197, in setup_context
yield
File "/usr/lib64/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python3.5/site-packages/setuptools/sandbox.py", line 168, in save_modules
saved_exc.resume()
File "/usr/lib/python3.5/site-packages/setuptools/sandbox.py", line 143, in resume
six.reraise(type, exc, self._tb)
File "/usr/lib/python3.5/site-packages/pkg_resources/_vendor/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3.5/site-packages/setuptools/sandbox.py", line 156, in save_modules
yield saved
File "/usr/lib/python3.5/site-packages/setuptools/sandbox.py", line 197, in setup_context
yield
File "/usr/lib/python3.5/site-packages/setuptools/sandbox.py", line 246, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/lib/python3.5/site-packages/setuptools/sandbox.py", line 276, in run
return func()
File "/usr/lib/python3.5/site-packages/setuptools/sandbox.py", line 245, in runner
_execfile(setup_script, ns)
File "/usr/lib/python3.5/site-packages/setuptools/sandbox.py", line 47, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-j_v6nkgj/cffi-1.10.0/setup.py", line 135, in <module>
File "/tmp/easy_install-j_v6nkgj/cffi-1.10.0/setup.py", line 70, in ask_supports_thread
'Topic :: Text Processing :: Markup',
File "/tmp/easy_install-j_v6nkgj/cffi-1.10.0/setup.py", line 52, in no_working_compiler_found
packages=['misaka'],
SystemExit: 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-fkyx6m64/misaka/setup.py", line 76, in <module>
cffi_modules=['build_ffi.py:ffi'],
File "/usr/lib64/python3.5/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python3.5/site-packages/setuptools/dist.py", line 348, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/lib/python3.5/site-packages/setuptools/dist.py", line 394, in fetch_build_eggs
replace_conflicting=True,
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 826, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1098, in best_match
return self.obtain(req, installer)
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1110, in obtain
return installer(requirement)
File "/usr/lib/python3.5/site-packages/setuptools/dist.py", line 461, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 663, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 693, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 874, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 1113, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 1101, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with 1
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-fkyx6m64/misaka/
I got a similar issue while using virtual environment. Explicitly mention pip2, this might work
pip2 install misaka
and while executing also mention python2
python2 example.py
I am solved it by take this way:
install conda with prombt of conda install : conda install libpython m2w64-toolchain -c msys2
upgrade your pip by : python -m pip install --upgrade pip
instal misaka : pip install misaka

CNTK on Jupyter notebook kernal not working

I am trying to get Jupyter Notebook to work with my Azure data Science VM and the kernel in not working. I installes CNTK using the shellbash and it works well from the command like. However when I pull it up using Anaconda or with the command: "jupyter notebook" I get this error:
Traceback (most recent call last):
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site- packages\notebook\base\handlers.py", line 503, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site- packages\tornado\gen.py", line 1015, in run
value = future.result()
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\notebook\services\sessions\handlers.py", line 75, in post
type=mtype))
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\gen.py", line 1015, in run
value = future.result()
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 79, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\gen.py", line 1015, in run
value = future.result()
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\gen.py", line 1021, in run
yielded = self.gen.throw(*exc_info)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 92, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\gen.py", line 1015, in run
value = future.result()
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\concurrent.py", line 237, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\tornado\gen.py", line 285, in wrapper
yielded = next(result)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 87, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\jupyter_client\manager.py", line 243, in start_kernel
**kw)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\jupyter_client\manager.py", line 189, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\site-packages\jupyter_client\launcher.py", line 123, in launch_kernel
proc = Popen(cmd, **kwargs)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "C:\local\Anaconda3-4.1.1-Windows-x86_64\envs\cntk-py35\lib\subprocess.py", line 1224, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
Any advice on how to get the python kernel to work with CNTK in the notebook?
I opened up the terminal to the CNTK-py35 directory and entered the following code and the kernel started working got it working:
conda create -n py35 python=3.5
activate py35
conda install notebook ipykernel
ipython kernel install --user --name=python3.5
Then I opened jupyter notebook from inside Anaconda and ran
import CNTK
Need a bit more information to give you meaningful advice, as I cannot see it from the screen dump.
Are you able to activate CNTK-py35 environment
If you are able to activate the environment, could you please start the python kernel from within the activated environment
If you are successful with that from within the python shell are you able to run import CNTK
If that works, that means your CNTK installation is good.
Now you can go the command prompt, from within the activate environment can you try starting the jupyter notebook environment.
You can find more information along these lines for the python setup, at this link: https://github.com/Microsoft/CNTK/wiki/Setup-Windows-Python

pylint not running on MacOS

It seems that pylint on MacOS is not doing anything at all. Here is what I get. I did install pylint by doing pip install pylint
$ pylint tunnel.py
No config file found, using default configuration
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pylint/lint.py", line 910, in get_ast
return MANAGER.ast_from_file(filepath, modname, source=True)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astroid/manager.py", line 112, in ast_from_file
return AstroidBuilder(self).file_build(filepath, modname)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astroid/builder.py", line 134, in file_build
module = self._data_build(data, modname, path)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astroid/builder.py", line 177, in _data_build
module = rebuilder.visit_module(node, modname, node_file, package)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astroid/rebuilder.py", line 148, in visit_module
newnode.body = [self.visit(child, newnode) for child in node.body]
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astroid/rebuilder.py", line 148, in <listcomp>
newnode.body = [self.visit(child, newnode) for child in node.body]
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astroid/rebuilder.py", line 161, in visit
return self._transform(visit_method(node, parent))
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astroid/rebuilder.py", line 238, in visit_assign
newnode.value = self.visit(node.value, newnode)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astroid/rebuilder.py", line 161, in visit
return self._transform(visit_method(node, parent))
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/astroid/rebuilder.py", line 331, in visit_callfunc
if node.starargs is not None:
AttributeError: 'Call' object has no attribute 'starargs'
************* Module temp.test
F: 1, 0: <class 'AttributeError'>: 'Call' object has no attribute 'starargs' (astroid-error)
You're mentioning that you're using pylint 1.4.4, which is quite old and won't work with Python 3.5.
You should upgrade to the latest releases of pylint/astroid, e.g. by doing pip install -U pylint.

Resources