I am trying to install scipy using enpkg in Enthought Canopy but I am getting this error:
(canopy_env) server 17:10:33 ~ $ enpkg scipy
prefix: /home/user/apps/canopy_env
Traceback (most recent call last):
File "/home/user/apps/canopy_env/bin/enpkg", line 10, in <module>
sys.exit(main())
File "/home/user/apps/Canopy/appdata/canopy-1.1.0.1371.rh5-x86_64/lib/python2.7/site-packages/enstaller/main.py", line 746, in main
install_req(enpkg, req, args) # install (default)
File "/home/user/apps/Canopy/appdata/canopy-1.1.0.1371.rh5-x86_64/lib/python2.7/site-packages/enstaller/main.py", line 395, in install_req
_perform_install()
File "/home/user/apps/Canopy/appdata/canopy-1.1.0.1371.rh5-x86_64/lib/python2.7/site-packages/enstaller/main.py", line 311, in _perform_install
enpkg.execute(actions)
File "/home/user/apps/Canopy/appdata/canopy-1.1.0.1371.rh5-x86_64/lib/python2.7/site-packages/enstaller/enpkg.py", line 279, in execute
self.fetch(egg, force=int(opcode[-1]))
File "/home/user/apps/Canopy/appdata/canopy-1.1.0.1371.rh5-x86_64/lib/python2.7/site-packages/enstaller/enpkg.py", line 455, in fetch
f.fetch_egg(egg, force, self._execution_aborted)
File "/home/user/apps/Canopy/appdata/canopy-1.1.0.1371.rh5-x86_64/lib/python2.7/site-packages/enstaller/fetch.py", line 147, in fetch_egg
self.fetch(egg, execution_aborted)
File "/home/user/apps/Canopy/appdata/canopy-1.1.0.1371.rh5-x86_64/lib/python2.7/site-packages/enstaller/fetch.py", line 30, in fetch
fi, info = self.remote.get(key)
File "/home/user/apps/Canopy/appdata/canopy-1.1.0.1371.rh5-x86_64/lib/python2.7/site-packages/enstaller/store/indexed.py", line 47, in get
return self.get_data(key), self.get_metadata(key)
File "/home/user/apps/Canopy/appdata/canopy-1.1.0.1371.rh5-x86_64/lib/python2.7/site-packages/enstaller/store/indexed.py", line 136, in get_data
raise KeyError("%s: %s" % (e, url))
KeyError: u'HTTP Error 404: NOT FOUND: https://api.enthought.com/eggs/rh5-64/libgfortran-3.0.0-1.egg'
I am using Canopy Express and this package is provided (see this)..
I have tried to install it from pip but, since I have not administration permissions, I am unable to install it..
Edit: the same happens with Pygments package when installing ipython:
appinst-2.1.2-1.egg [fetching]
55 KB [.................................................................]
MarkupSafe-0.18-2.egg [fetching]
26 KB [.................................................................]
...
KeyError: u'HTTP Error 404: NOT FOUND: https://api.enthought.com/eggs/rh5-64/Pygments-1.6.0-1.egg'
Thanks
a few of our free packages had been flagged as "commercial" by mistake. We fixed the problem and you should be able to install them now.
Sorry about the trouble!
Related
Suggestions please, thanks :)
pip list --outdated --format=freeze
Gives the following error:
ERROR: Exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 223, in _main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line 175, in run
packages = self.get_outdated(packages, options)
File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line 184, in get_outdated
return [
File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line 184, in <listcomp>
return [
File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line 237, in iter_packages_latest_infos
for dist in map_multithread(latest_info, packages):
File "/usr/lib/python3.9/multiprocessing/pool.py", line 870, in next
raise value
File "/usr/lib/python3.9/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line 214, in latest_info
all_candidates = finder.find_all_candidates(dist.key)
File "/usr/lib/python3/dist-packages/pip/_internal/index/package_finder.py", line 825, in find_all_candidates
package_links = self.process_project_url(
File "/usr/lib/python3/dist-packages/pip/_internal/index/package_finder.py", line 793, in process_project_url
page_links = list(parse_links(html_page))
File "/usr/lib/python3/dist-packages/pip/_internal/index/collector.py", line 324, in wrapper_wrapper
return list(fn(page))
File "/usr/lib/python3/dist-packages/pip/_internal/index/collector.py", line 335, in parse_links
document = html5lib.parse(
File "/usr/share/python-wheels/html5lib-1.1-py2.py3-none-any.whl/html5lib/html5parser.py", line 44, in parse
tb = treebuilders.getTreeBuilder(treebuilder)
File "/usr/share/python-wheels/html5lib-1.1-py2.py3-none-any.whl/html5lib/treebuilders/__init__.py", line 85, in getTreeBuilder
return etree.getETreeModule(implementation, **kwargs).TreeBuilder
AttributeError: module 'html5lib.treebuilders.etree' has no attribute 'getETreeModule'
I solved this problem updating pip, i updated from pip 20.3.4 to 21.3
so just type:
pip install pip -U
Seems like there is some bug in pip itself.
I've done some analysis of this bug in in the Debian bugtracker.
It appears to be a race-condition triggered by the way Debian was packaging pip until recently. Dependencies were zipimported from wheels instead of vendored in the source tree, as upstream does.
This should already be resolved in Debian >= 12 (bookworm) and Ubuntu >= 22.04 (jammy).
An updated for pip in Debian 11 (bullseye) is in progress.
Not a fix, but a solution of sorts:
I 'fixed' this by updating every package.
for f in `pip list | tail -n +3 | cut -d' ' -f1`; do
pip install --update "$f";
done
I found OP's problem while logged-in as root and immediately after upgrading to Debian 11; dunno if that's significant.
Tensorboard fails to launch. I get the following error messages. Can somebody guide. I have reinstalled conda and Tensorflow multiple times. I also looked online for similar issues, have not found anything.
Python 3.7.4 and Tensforflow version 2.1
ERROR: Failed to launch TensorBoard (exited with 1).
Contents of stderr:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\Scripts\tensorboard-script.py", line 9, in
sys.exit(run_main())
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorboard\main.py", line 65, in run_main
default.get_plugins() + default.get_dynamic_plugins(),
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorboard\default.py", line 125, in get_dynamic_plugins
"tensorboard_plugins"
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorboard\default.py", line 124, in
for entry_point in pkg_resources.iter_entry_points(
File "C:\ProgramData\Anaconda3\lib\site-packages\pkg_resources_init_.py", line 2442, in load
self.require(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\pkg_resources_init_.py", line 2465, in require
items = working_set.resolve(reqs, env, installer, extras=self.extras)
File "C:\ProgramData\Anaconda3\lib\site-packages\pkg_resources_init_.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'typing-extensions>=3.7.4; python_version < "3.8"' distribution was not found and is required by yarl
You need to install typing-extensions.
While running $ pip install <package>, I am getting below error, in this case I am installing PyJWT and also checked for other packages to crosscheck. This happened after upgrading pip to 19.0.2 from 19.0.1.
Check below errors while running pip install PyJWT, requirement are already satisfied, but still I am getting error, please suggest how to fix it.
$ easy_install pip
for reinstalling the pip.
$ pip install PyJWT
Tejeshs-MacBook-Air:selenium_testing tejeshagrawal$ pip install PyJWT
Requirement already satisfied: PyJWT in
/usr/local/lib/python3.7/site-packages (1.7.1) Error checking for
conflicts. Traceback (most recent call last): File
"/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
line 2897, in _dep_map
return self.__dep_map File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
line 2691, in __getattr__
raise AttributeError(attr) AttributeError: _DistInfoDistribution__dep_map
**During handling of the above exception, another exception occurred:**
Traceback (most recent call last): File
"/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
line 2888, in _parsed_pkg_info
return self._pkg_info File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
line 2691, in __getattr__
raise AttributeError(attr) AttributeError: _pkg_info
**During handling of the above exception, another exception occurred:**
Traceback (most recent call last): File
"/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_internal/commands/install.py",
line 503, in _warn_about_conflicts
package_set, _dep_info = check_install_conflicts(to_install) File
"/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_internal/operations/check.py",
line 108, in check_install_conflicts
package_set, _ = create_package_set_from_installed() File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_internal/operations/check.py",
line 47, in create_package_set_from_installed
package_set[name] = PackageDetails(dist.version, dist.requires()) File
"/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
line 2635, in requires
dm = self._dep_map File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
line 2899, in _dep_map
self.__dep_map = self._compute_dependencies() File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
line 2908, in _compute_dependencies
for req in self._parsed_pkg_info.get_all('Requires-Dist') or []: File
"/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
line 2890, in _parsed_pkg_info
metadata = self.get_metadata(self.PKG_INFO) File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
line 1410, in get_metadata
value = self._get(self._fn(self.egg_info, name)) File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
line 1522, in _get
with open(path, 'rb') as stream: FileNotFoundError: [Errno 2] No such file or directory:
'/usr/local/lib/python3.7/site-packages/~ip-18.1.dist-info/METADATA'
Tejeshs-MacBook-Air:selenium_testing tejeshagrawal$ pip freeze >
require.txt Could not parse requirement: -ip Exception: Traceback
(most recent call last): File
"/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
line 2584, in version
return self._version File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
line 2691, in __getattr__
raise AttributeError(attr) AttributeError: _version
**During handling of the above exception, another exception occurred:**
Traceback (most recent call last): File
"/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_internal/cli/base_command.py",
line 179, in main
status = self.run(options, args) File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_internal/commands/freeze.py",
line 93, in run
for line in freeze(**freeze_kwargs): File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_internal/operations/freeze.py",
line 62, in freeze
req = FrozenRequirement.from_dist(dist) File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_internal/operations/freeze.py",
line 239, in from_dist
req = dist.as_requirement() File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
line 2716, in as_requirement
if isinstance(self.parsed_version, packaging.version.Version): File
"/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
line 2551, in parsed_version
self._parsed_version = parse_version(self.version) File "/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages/pip/_vendor/pkg_resources/__init__.py",
line 2589, in version
raise ValueError(tmpl % self.PKG_INFO, self) ValueError: ("Missing 'Version:' header and/or METADATA file", Unknown [unknown version]
(/usr/local/lib/python3.7/site-packages))
Seems like your problem is similar or the same as this bug which was ironically fixed in 19.0.2. The problem is somewhere along the line you tried to install a module and it failed. pip didn't properly clean up after itself and left a package in a broken state.
The solution seems to be to find any directories starting with - in your site-packages directory (/Users/tejeshagrawal/Library/Python/3.7/lib/python/site-packages in your case) and rename them to what they should be. eg. if you find -yJWT-1.0.dist-info then you should rename it to PyJWT-1.0.dist-info. If you're not sure what it's real name should be then look for the Name value in -yJWT-1.0.dist-info/METADATA. NB. I just used PyJWT as an example, it might not be the package(s) that is/are broken. After that pip should be able to get up and running again.
Complementary finding:
Using #Dunes answer, couldn't fix the file name so I ended-up unninstalling every package from PIP
PowerShell pip uninstall -y (pip freeze)
When the loop broke on the Plackage "Plotly" I found the culprit.
You could try to install the package pip-conflict-checker:
pip install pip-conflict-checker
and then run the command:
pipconflictchecker
this will show you the packages that cause troubles
You can create a virtual environment as well by following this link:- https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands
Step 1: conda create -n myenv python=3.7.4
Step 2: conda activate myenv
Step 3: pip install package_name
This helps to manage an individual conda environment to manage packages.
When I run python pip on a new brand Ubuntu 15.04 system with all updates installed, I get the following assertion error. This is with Python 2.7.x. I get a very similar result with Python 3.4.x:
➜ pip list
adium-theme-ubuntu (0.3.4)
<...snip...>
pyOpenSSL (0.13.1)
pyserial (2.6)
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 80, in run
self.run_listing(options)
File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 142, in run_listing
self.output_package_listing(installed_packages)
File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 151, in output_package_listing
if dist_is_editable(dist):
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 367, in dist_is_editable
req = FrozenRequirement.from_dist(dist, [])
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 299, in from_dist
assert len(specs) == 1 and specs[0][0] == '=='
AssertionError
I think you should report this as a bug here. I can reproduce it in my Ubuntu 15.04 (64bit). The man page clearly states the pip list and pip3 list commands should simply list the packages, but in both cases they crash with AssertionError before completing.
I have just installed Python 3.4.3 on my MAC (Yosemite). I need to install a couple of lxml, however everytime I type in: pip install /""/, I get error messages.
I have followed multiple tutorials and pip is installed.
MAC already had Python 2.7., but I installed the 3.4.3. version, not sure if that is the issue.
The error message is:
Brunos-MacBook-Pro:~ BrunoPaesLeme$ pip install /Macintosh HD/Users//Downloads/pycairo-1.10.0-cp27-none-win_amd64.whl
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/basecommand.py", line 223, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/commands/install.py", line 268, in run
wheel_cache
File "/Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/basecommand.py", line 268, in populate_requirement_set
wheel_cache=wheel_cache
File "/Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/req/req_install.py", line 207, in from_line
wheel_cache=wheel_cache)
File "/Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/req/req_install.py", line 66, in init
req = pkg_resources.Requirement.parse(req)
File "/Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/_vendor/pkg_resources/init.py", line 2960, in parse
reqs = list(parse_requirements(s))
File "/Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/_vendor/pkg_resources/init.py", line 2891, in parse_requirements
raise ValueError("Missing distribution spec", line)
ValueError: ('Missing distribution spec', '/Macintosh')
Anybody knows what I could be doing wrong? Any help would be appreciated.
try:
easy_install pip
pip install /"filepath"/
I have similar issue with pip install. However, if I do "sudo su -" then do my pip install 'fileName', that solve the problem for me.