ValueError when trying to use pipenv install - python

I am totally new to this. So I installed pipenv using 'pip install pipenv'. I have python version 3.8.2, pip version 20.1.1 and pipenv version 2020.6.2 .
But when I try to run 'pipenv install' it gives the following error.
C:\Users\rd463>pipenv install
Traceback (most recent call last):
File "D:\python382\Lib\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 618, in parse_executable
result_version = get_python_version(path)
File "D:\python382\Lib\site-packages\pipenv\vendor\pythonfinder\utils.py", line 105, in get_python_version
c = subprocess.Popen(version_cmd, **subprocess_kwargs)
File "d:\python382\lib\subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "d:\python382\lib\subprocess.py", line 1307, 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 "d:\python382\lib\runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "d:\python382\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "D:\python382\Scripts\pipenv.exe\__main__.py", line 7, in <module>
File "D:\python382\Lib\site-packages\pipenv\vendor\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "D:\python382\Lib\site-packages\pipenv\vendor\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "D:\python382\Lib\site-packages\pipenv\vendor\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "D:\python382\Lib\site-packages\pipenv\vendor\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "D:\python382\Lib\site-packages\pipenv\vendor\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "D:\python382\Lib\site-packages\pipenv\vendor\click\decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "D:\python382\Lib\site-packages\pipenv\vendor\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "D:\python382\Lib\site-packages\pipenv\vendor\click\decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "d:\python382\lib\site-packages\pipenv\cli\command.py", line 232, in install
retcode = do_install(
File "d:\python382\lib\site-packages\pipenv\core.py", line 1921, in do_install
ensure_project(
File "d:\python382\lib\site-packages\pipenv\core.py", line 576, in ensure_project
ensure_virtualenv(
File "d:\python382\lib\site-packages\pipenv\core.py", line 498, in ensure_virtualenv
python = ensure_python(three=three, python=python)
File "d:\python382\lib\site-packages\pipenv\core.py", line 388, in ensure_python
path_to_python = find_a_system_python(python)
File "d:\python382\lib\site-packages\pipenv\core.py", line 350, in find_a_system_python
return next(iter(finder.find_all_python_versions()), None)
File "d:\python382\lib\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 312, in find_all_python_versions
python_version_dict = getattr(self.system_path, "python_version_dict", {})
File "d:\python382\lib\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 120, in system_path
self._system_path = self.create_system_path()
File "d:\python382\lib\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 82, in create_system_path
return pyfinder_path.SystemPath.create(
File "D:\python382\Lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 682, in create
instance = instance._run_setup()
File "D:\python382\Lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 233, in _run_setup
new_instance = new_instance._setup_windows()
File "D:\python382\Lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 411, in _setup_windows
windows_finder = WindowsFinder.create()
File "D:\python382\Lib\site-packages\pipenv\vendor\pythonfinder\models\windows.py", line 146, in create
return cls()
File "<attrs generated init pythonfinder.models.windows.WindowsFinder>", line 13, in __init__
File "D:\python382\Lib\site-packages\pipenv\vendor\pythonfinder\models\windows.py", line 113, in get_versions
versions[py_version.version_tuple[:5]] = base_dir
File "D:\python382\Lib\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 365, in __getattribute__
result = super(PythonVersion, self).__getattribute__(key)
File "D:\python382\Lib\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 430, in version_tuple
self.patch,
File "D:\python382\Lib\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 375, in __getattribute__
instance_dict = self.parse_executable(executable)
File "D:\python382\Lib\site-packages\pipenv\vendor\pythonfinder\models\python.py", line 620, in parse_executable
raise ValueError("Not a valid python path: %r" % path)
ValueError: Not a valid python path: 'D:/program_files/Anaconda3/Scripts/python.exe'
Running 'python -m pipenv.help' gives -
C:\Users\rd463>python -m pipenv.help
$ pipenv --support
Pipenv version: '2020.6.2'
Pipenv location: 'D:\\python382\\lib\\site-packages\\pipenv'
Python location: 'D:\\python382\\python.exe'
Python installations found:
followed by the same error again.
I have python installed in 'D:/python382'
There is no such directory that the error mentions. I have checked my environment variables and everything is fine there too. Please help me with this error.
Thank you for your time.

I think the newer version of pipenv is causing the error, I use this command when having the same issue and it worked for me, just use
pip install pipenv==2018.10.13

I had the same problem when I uninstalled Anaconda. Mine got solved after I did the following steps
run regedit.exe
Go to
Computer\HKEY_CURRENT_USER\Software\Python\PythonCore
If there is/are folders having previous versions of python.Delete every version of python other than your current one(for eg.3.7, 3.8 etc. I also had to delete some folder containing something related to anaconda to solve the problem (other than the previous versions)

I was just struggling with a similar problem with pipenv that was giving me the same error messages.
WinError 2 has to do with corrupted files in one of your Python installs/uninstalls. I searched regedit for Anaconda3 to figure out which version of Python that I had previously installed or uninstalled was causing the problem.
For me, it was Python 3.6.5. I installed it in the same location as the path in the error message (in your case that would be D:/program_files/). Then, I just uninstalled it with the installation exe, and I stopped getting these error messages.

Have you tried the conda install command? To do this, go on your anaconda prompt, cd in the folder where you have installed your anaconda. Have a look at this.
conda install -c conda-forge pipenv
make sure you activate your environment before running the conda install command. To activate your environment run conda activate envname. I hope it helps!

Related

Pipenv error when trying to uninstall dependencies

I am quite new to Python and I am trying to setup a project with pipenv. It seemed to work well, but when I tried to uninstall dependencies, I got the following error:
# pipenv uninstall flask
Uninstalling flask...
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 8, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.10/dist-packages/pipenv/vendor/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pipenv/vendor/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/dist-packages/pipenv/vendor/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.10/dist-packages/pipenv/vendor/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/dist-packages/pipenv/vendor/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pipenv/vendor/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pipenv/vendor/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pipenv/vendor/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pipenv/cli/command.py", line 247, in uninstall
retcode = do_uninstall(
File "/usr/local/lib/python3.10/dist-packages/pipenv/core.py", line 2258, in do_uninstall
with project.environment.activated():
File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.10/dist-packages/pipenv/environment.py", line 894, in activated
if extra_dist not in self.get_working_set():
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 629, in __contains__
return self.by_key.get(dist.key) == dist
AttributeError: 'NoneType' object has no attribute 'key'
I uninstalled and installed pipenv, but the issue persists. I am using WSL2.
I also tried uninstalling all dependencies. It have worked, but they did not disappear from the Pipfile - I am not sure if it is a separate issue, but thought it's worth mentioning.
Could someone advise? Also let me know if I missed something.
Thanks!
Try to remove the virtualenv, that pipenv creates, and after that run again pipenv install, don't forgot to remove flask from pipfile and pipfile.lock
You can try too to execute WSL with admin privileges before.

Installing django with python error on widows 10?

I seem to get errors when installing django with the following commands. I follow the instructions form the book i am using exactly but get errors. First installing pipenv gave me errors about path and updating the paths in windows manually fixed that.
pip3 install pipenv <---- executes correlty with no errors
pipenv install django ~=3.1.0 <----- get the following errors below
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.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.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\zzzz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts\pipenv.exe\__main__.py", line 7, in <module>
File "C:\Users\zzzz\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\zzzz\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\zzzz\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\zzzz\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\zzzz\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\zzzz\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\zzzz\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\zzzz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\cli\command.py", line 194, in install
do_install(
File "C:\Users\zzzz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\core.py", line 2046, in do_install
pkg_requirement = Requirement.from_line(pkg_line)
File "C:\Users\zzzz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 2674, in from_line
parsed_line = Line(line)
File "C:\Users\zzzz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 171, in __init__
self.parse()
File "C:\Users\zzzz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 1304, in parse
self.parse_name()
File "C:\Users\zzzz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 1027, in parse_name
name = self._parse_name_from_line()
File "C:\Users\zzzz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 968, in _parse_name_from_line
raise RequirementError(
pipenv.vendor.requirementslib.exceptions.RequirementError: Failed parsing requirement from 'C:\\Users\\=3.1.0'
any help would be appreciated. I have disabled windows defender just encase it was a internet access isue even though the error does not report as such. I am running all commands through windwos power shell as administrator. I am using python 3.9
I cant seem to find anyone with similar problem online. Would appreciate some help
Thank you
https://virtualenvwrapper.readthedocs.io/en/latest/install.html
Make new env
Mkvirtualenv test
pip install django
Just encase anyone is interested in why I was encountering the above error, it was because of the space between django and ~ .
pipenv install django ~=3.1.0 <------ gave me errors
pipenv install django~=3.1.0 <----- everything was fine.

why am i getting this error when i am using pipenv to install scrapy?

I'm using pipenv to install scrapy on windows10 X64:
pipenv shell
pipenv install scrapy
then i get this error below:
(scrapy_demo-Nk7qjJjf) D:\PycharmProjects\scrapy_demo>pipenv install scrapy
Installing scrapy...
Traceback (most recent call last):
File "c:\users\russellxu\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\russellxu\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\RussellXu\AppData\Local\Programs\Python\Python37\Scripts\pipenv.exe\__main__.py", line 9, in <module>
File "c:\users\russellxu\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "c:\users\russellxu\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "c:\users\russellxu\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\russellxu\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\russellxu\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "c:\users\russellxu\appdata\local\programs\python\python37\lib\site-packages\pipenv\cli.py", line 435, in install
selective_upgrade=selective_upgrade,
File "c:\users\russellxu\appdata\local\programs\python\python37\lib\site-packages\pipenv\core.py", line 1971, in do_install
pypi_mirror=pypi_mirror,
File "c:\users\russellxu\appdata\local\programs\python\python37\lib\site-packages\pipenv\core.py", line 1375, in pip_install
package_name.split('--hash')[0].split('--trusted-host')[0]
File "c:\users\russellxu\appdata\local\programs\python\python37\lib\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 704, in from_line
line, extras = _strip_extras(line)
TypeError: 'module' object is not callable
so why am i getting this error and how can i fix it ?
Make sure pipenv is upgraded to the latest version.
If upgrading didn't work, you can try this workaround as mentioned in: https://github.com/pypa/pipenv/issues/2924#issuecomment-427351356
pip install pipenv
pipenv run pip install pip==18.0
pipenv install

Arcgis Pro 2.0 Jupyter Notebook Install Fails

I did a fresh windows install of ArcGIS Pro 2.0 to a local user location. I then used the python package installer to install spyder and jupyter.
I launched jupyter notebook from the python command prompt that resides in the start menu for ArcGIS Pro.
Jupyter launches, but creating a new notebook always starts with a dead kernel. ipykernel is installed according to the ArcGIS pro python package manager. The kernel error message follows.
Traceback (most recent call last):
File "C:\Users\rdchlbms\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\notebook\base\handlers.py", line 516, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "C:\Users\rdchlbms\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "C:\Users\rdchlbms\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "C:\Users\rdchlbms\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\tornado\gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "C:\Users\rdchlbms\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\notebook\services\sessions\handlers.py", line 75, in post
type=mtype))
File "C:\Users\rdchlbms\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "C:\Users\rdchlbms\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "C:\Users\rdchlbms\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\tornado\gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "C:\Users\rdchlbms\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\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:\Users\rdchlbms\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "C:\Users\rdchlbms\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "C:\Users\rdchlbms\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\tornado\gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "C:\Users\rdchlbms\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\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:\Users\rdchlbms\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "C:\Users\rdchlbms\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "C:\Users\rdchlbms\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\tornado\gen.py", line 307, in wrapper
yielded = next(result)
File "C:\Users\rdchlbms\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 94, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "C:\Users\rdchlbms\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "C:\Users\rdchlbms\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\jupyter_client\manager.py", line 257, in start_kernel
**kw)
File "C:\Users\rdchlbms\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\jupyter_client\manager.py", line 203, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "C:\Users\rdchlbms\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\jupyter_client\launcher.py", line 128, in launch_kernel
proc = Popen(cmd, **kwargs)
File "C:\Users\rdchlbms\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\subprocess.py", line 676, in __init__
restore_signals, start_new_session)
File "C:\Users\rdchlbms\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\subprocess.py", line 957, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
I've worked on this problem for a few days but I can't figure it out. I've looked at a number of posts that discuss connecting Jupyter and arcgis. They all make it appear possible if not easy, but this seems like a non-starter. What is missing, and why is the kernel starting dead? How do I fix it?
you said it's dead kernel though python is installed , assuming everything ok (versions, etc) ,that's means jupyter didn't recognize the kernel yet
The error is matching that of: issue
I think it's mostly the same , sometimes the kernels json files for jupyter need to be created in some folder (in windows it were in C:/Programs Data/Jupyter/.. ) before the first usage
launch the command (as admin):
python -m Jupyter kernelspec install-self
Then retry,
To fix it, run the python command prompt with the following:
(gee) C:\Users\thapa\AppData\Local\ESRI\conda\envs\gee>
conda activate tensorflow1
conda install ipykernel
ipython kernel install --name tensorflow1 --user
Restart ArcGIS pro, now it will work.

Conda stopped working

I was installing pymc through conda, and it told me to update a few of the files so no problem. However, after updating, it gave an OSError, and now, I cannot access any conda build commands. Now, when I type any conda command, it gives me
-bash: conda: command not found
I checked the bash_profile, and .bashrc, and both have the appropriate PATH for conda, and most modules installed through conda still works. Running python and checking the version yields
Python 2.7.11 :: Anaconda custom (x86_64)
Looking at the ~/anaconda/bin, I see that the conda folder is not there. Is there anyway to fix this? Is the only solution to re-install anaconda?
Sorry, I do not have any of the terminal outputs since I closed all my windows. Also, I didn't realize I was running Jupyter notebook in the background, but this shouldn't have a problem. Jupyter no longer runs, and yields the error
[W 01:34:35.979 NotebookApp] Unrecognized JSON config file version, assuming version 1
Traceback (most recent call last):
File "/Users/kaichang/anaconda/bin/jupyter-notebook", line 6, in <module>
sys.exit(notebook.notebookapp.main())
File "/Users/kaichang/anaconda/lib/python2.7/site-packages/jupyter_core/application.py", line 267, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/Users/kaichang/anaconda/lib/python2.7/site-packages/traitlets/config/application.py", line 595, in launch_instance
app.initialize(argv)
File "<decorator-gen-7>", line 2, in initialize
File "/Users/kaichang/anaconda/lib/python2.7/site-packages/traitlets/config/application.py", line 74, in catch_config_error
return method(app, *args, **kwargs)
File "/Users/kaichang/anaconda/lib/python2.7/site-packages/notebook/notebookapp.py", line 1069, in initialize
self.init_configurables()
File "/Users/kaichang/anaconda/lib/python2.7/site-packages/notebook/notebookapp.py", line 837, in init_configurables
parent=self,
File "/Users/kaichang/anaconda/lib/python2.7/site-packages/nb_conda_kernels/manager.py", line 19, in __init__
specs = self.find_kernel_specs() or {}
File "/Users/kaichang/anaconda/lib/python2.7/site-packages/nb_conda_kernels/manager.py", line 129, in find_kernel_specs
self.conda_info = self._conda_info()
File "/Users/kaichang/anaconda/lib/python2.7/site-packages/nb_conda_kernels/manager.py", line 29, in _conda_info
p = subprocess.check_output(["conda", "info", "--json"]
File "/Users/kaichang/anaconda/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/Users/kaichang/anaconda/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/Users/kaichang/anaconda/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Sorry, I'm just not entirely sure what is going on.
Looking at the ~/anaconda/bin, I see that the conda folder is not
there. Is there anyway to fix this?
In answer to this, you can try overwriting your conda installation:
bash /path/to/Miniconda2-latest-MacOSX-x86_64.sh -bfp /Users/kaichang/anaconda/

Categories