I have a problem with installing packages via the built in Package Manager of enthought Canopy. I tried to use the "Upgrade all packages", but it failed.
Beforehand, I tried to solve my problem according to this post, but it did not functionating.
The Package Manager returns with the message:
Warming up...
Traceback (most recent call last):
File "build/bdist.macosx-10.6- x86_64/egg/canopy_dashboard/packman/package_action_worker.py", line 52, in run
File "build/bdist.macosx-10.6- x86_64/egg/canopy_dashboard/packman/package_action.py", line 196, in execute
File "build/bdist.macosx-10.6- x86_64/egg/canopy_dashboard/packman/packman.py", line 726, in <lambda>
File "build/bdist.macosx-10.6- x86_64/egg/canopy_dashboard/packman/packman.py", line 1116, in _upgrade_all
File "build/bdist.macosx-10.6- x86_64/egg/canopy_platform/cpython_packages_manager.py", line 268, in upgrade_all_packages_prompt
File "build/bdist.macosx-10.6- x86_64/egg/canopy_platform/cpython_packages_manager.py", line 334, in _upgrade_all_packages_prompt
PackageUpgradeAllError: upgrading all packages failed. Details below:
Traceback (most recent call last):
File "build/bdist.macosx-10.6- x86_64/egg/canopy_platform/edm_api.py", line 65, in wrapper
File "build/bdist.macosx-10.6- x86_64/egg/canopy_platform/edm_api.py", line 431, in upgrade_all_packages_command
File "build/bdist.macosx-10.6- x86_64/egg/canopy_platform/edm_api.py", line 95, in wrapper
File "build/bdist.macosx-10.6- x86_64/egg/canopy_platform/edm_api.py", line 454, in _upgrade_all_command
File "build/bdist.macosx-10.6- x86_64/egg/edm/core/packages_manager.py", line 124, in decorator
File "build/bdist.macosx-10.6- x86_64/egg/edm/core/packages_manager.py", line 490, in upgrade_all_command
File "build/bdist.macosx-10.6- x86_64/egg/edm/core/packages_manager.py", line 505, in _upgrade_all_command
File "build/bdist.macosx-10.6- x86_64/egg/edm/core/packages_manager.py", line 774, in _actions_from_request
UnresolvableRequirements: Unable to satisfy requirements
Conflicting requirements:
Requirements: 'qt == 5.6.2-1'
Install command rule (+qt-5.6.2-1)
Requirements: 'pyside == 1.2.2-15' <- 'qt ^= 4.8.7' <- 'qt'
Can only install one of: (+qt-4.8.7-7 | +qt-5.6.2-1)
Requirements: 'pyside == 1.2.2-15' <- 'shiboken ^= 1.2.2' <- 'qt ^= 4.8.7'
shiboken-1.2.2-14 requires (+qt-4.8.7-4 | +qt-4.8.7-5 | +qt- 4.8.7-6 | +qt-4.8.7-7 | +qt-4.8.7-9 | +qt-4.8.7-10)
Requirements: 'shiboken == 1.2.2-14'
Install command rule (+shiboken-1.2.2-14)
For me, this screen isn't informative and so I am not able to figure out how to solve this problem.
Please uninstall pyside, shiboken, and qt, then try again. (Pyside is already installed using qt 4, and this cannot coexist with qt 5 in the same environment.) Alternatively, you could use Canopy's integrated EDM to create a new environment with pyqt 5, so you could still use pyside / qt 4 in your original user environment and use pyqt 5 in your new environment.
Related
I am trying to build a Python package, but it gives the following error.
* Creating virtualenv isolated environment...
* Installing packages in isolated environment... (setuptools >= 40.8.0, wheel)
* Getting dependencies for sdist...
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/pep517/in_process/_in_process.py", line 351, in <module>
main()
File "/usr/local/lib/python3.10/site-packages/pep517/in_process/_in_process.py", line 333, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/local/lib/python3.10/site-packages/pep517/in_process/_in_process.py", line 285, in get_requires_for_build_sdist
return hook(config_settings)
File "/tmp/build-env-eyqolcf7/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_sdist
return self._get_build_requires(config_settings, requirements=[])
File "/tmp/build-env-eyqolcf7/lib/python3.10/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires
self.run_setup()
File "/tmp/build-env-eyqolcf7/lib/python3.10/site-packages/setuptools/build_meta.py", line 482, in run_setup
super(_BuildMetaLegacyBackend,
File "/tmp/build-env-eyqolcf7/lib/python3.10/site-packages/setuptools/build_meta.py", line 335, in run_setup
exec(code, locals())
File "<string>", line 5, in <module>
ModuleNotFoundError: No module named 'pathlib2'
ERROR Backend subprocess exited when trying to invoke get_requires_for_build_sdist
I have already installed pathlib2. What is the solution?
I have successfully build this in Python3.10. pip3.10 freeze gave me this output
build==0.8.0
packaging==21.3
pep517==0.13.0
pyparsing==3.0.9
tomli==2.0.1
As per the official documentation of the build package, it does not have a stable compatibility
https://pypa-build.readthedocs.io/en/latest/installation.html#compatibility
You can try switching to an older version of python (3.9 recommended) and try again,
ideally, that should solve the error since in traceback, the error seems to originate from setuptools ( which will be automatically reverted back to an older version with a older python version )
NOTE: You will also need to reinstall build in the new python version
Let me know if you face any issues with it.
I upgraded Spyder to 5.0.0 for all the environments. It launches without error when I launch it from base environment but produces Application Launch Error when I try to launch it from other environments. the error is as follows -
Traceback (most recent call last):
File "C:\Users\user\.conda\envs\KB\Scripts\spyder-script.py", line 10, in
sys.exit(main())
File "C:\Users\user\.conda\envs\KB\lib\site-packages\spyder\app\start.py", line 214, in main
mainwindow.main(options, args)
File "C:\Users\user\.conda\envs\KB\lib\site-packages\spyder\app\mainwindow.py", line 2293, in main
mainwindow = create_window(app, splash, options, args)
File "C:\Users\user\.conda\envs\KB\lib\site-packages\spyder\app\mainwindow.py", line 2146, in create_window
main.setup()
File "C:\Users\user\.conda\envs\KB\lib\site-packages\spyder\app\mainwindow.py", line 882, in setup
plugin_instance = plugin_class(self, configuration=CONF)
File "C:\Users\user\.conda\envs\KB\lib\site-packages\spyder\api\plugins.py", line 1425, in __init__
widget.set_icon(self.get_icon())
File "C:\Users\user\.conda\envs\KB\lib\site-packages\spyder\plugins\profiler\plugin.py", line 70, in get_icon
return self.create_icon('profiler')
File "C:\Users\user\.conda\envs\KB\lib\site-packages\spyder\api\plugins.py", line 1136, in create_icon
return ima.icon(name)
File "C:\Users\user\.conda\envs\KB\lib\site-packages\spyder\utils\icon_manager.py", line 380, in icon
return qta.icon(*args, **kwargs)
File "C:\Users\user\.conda\envs\KB\lib\site-packages\qtawesome\__init__.py", line 146, in icon
return _instance().icon(*names, **kwargs)
File "C:\Users\user\.conda\envs\KB\lib\site-packages\qtawesome\iconic_font.py", line 305, in icon
names[i]))
File "C:\Users\user\.conda\envs\KB\lib\site-packages\qtawesome\iconic_font.py", line 353, in _parse_options
prefix, chars = self._get_prefix_chars(names)
File "C:\Users\user\.conda\envs\KB\lib\site-packages\qtawesome\iconic_font.py", line 384, in _get_prefix_chars
raise Exception(error)
Exception: Invalid icon name "timer-outline" in font "mdi"
(Spyder maintainer here) To fix this problem you need to install the 1.0.2 version of the QtAwesome package in your environment.
You can do that by opening the Anaconda Prompt and running the following commands:
conda activate KB
conda install qtawesome=1.0.2
Note: There won't be a need to do this with Spyder 5.0.1, released on April 16th and soon to be part of Anaconda.
I can't figure out how to install PIL on my Mac (Sierra 10.12.4) running Anaconda (conda 4.3.18) python 2.7.10. Anaconda's default python is 3.5.2, so I'm installing with pip2.
My-MacBook-ProX:dymax thisuser$ sudo pip2 install PIL
Password:
Checking the installation location...
Getting information about 'PIL'...
2.0
Traceback (most recent call last):
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/pip2/commands/install.py", line 44, in install
success = packaging.install.install(project)
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/distutils2/install.py", line 515, in install
info = get_infos(project)
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/distutils2/install.py", line 309, in get_infos
installed = list(get_distributions(use_egg_info=True))
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/distutils2/database.py", line 440, in get_distributions
_generate_cache(use_egg_info, paths)
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/distutils2/database.py", line 103, in _generate_cache
for dist in _yield_distributions(gen_dist, gen_egg, paths):
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/distutils2/database.py", line 88, in _yield_distributions
yield Distribution(dist_path)
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/distutils2/database.py", line 146, in __init__
self.metadata = Metadata(path=metadata_path)
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/distutils2/metadata.py", line 219, in __init__
self.read(path)
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/distutils2/metadata.py", line 323, in read
self.read_file(fp)
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/distutils2/metadata.py", line 330, in read_file
for field in _version2fieldlist(self['Metadata-Version']):
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/distutils2/metadata.py", line 95, in _version2fieldlist
raise MetadataUnrecognizedVersionError(version)
distutils2.errors.MetadataUnrecognizedVersionError: 2.0
Traceback (most recent call last):
File "/Users/thisuser/anaconda3/bin/pip2", line 11, in <module>
load_entry_point('pip2==0.0.1.dev1', 'console_scripts', 'pip2')()
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/pip2/__init__.py", line 19, in main
args.func(args)
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/pip2/cli_wrapper.py", line 24, in install
result = pip2.commands.install.install(args.project_list)
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/pip2/commands/install.py", line 44, in install
success = packaging.install.install(project)
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/distutils2/install.py", line 515, in install
info = get_infos(project)
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/distutils2/install.py", line 309, in get_infos
installed = list(get_distributions(use_egg_info=True))
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/distutils2/database.py", line 440, in get_distributions
_generate_cache(use_egg_info, paths)
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/distutils2/database.py", line 103, in _generate_cache
for dist in _yield_distributions(gen_dist, gen_egg, paths):
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/distutils2/database.py", line 88, in _yield_distributions
yield Distribution(dist_path)
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/distutils2/database.py", line 146, in __init__
self.metadata = Metadata(path=metadata_path)
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/distutils2/metadata.py", line 219, in __init__
self.read(path)
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/distutils2/metadata.py", line 323, in read
self.read_file(fp)
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/distutils2/metadata.py", line 330, in read_file
for field in _version2fieldlist(self['Metadata-Version']):
File "/Users/thisuser/anaconda3/lib/python3.5/site-packages/distutils2/metadata.py", line 95, in _version2fieldlist
raise MetadataUnrecognizedVersionError(version)
distutils2.errors.MetadataUnrecognizedVersionError: 2.0
I get identical error for sudo pip2 install pillow. I also tried with conda:
My-MacBook-ProX:dymax thisuser$ conda install pillow
Fetching package metadata ...........
Solving package specifications: .
# All requested packages already installed.
# packages in environment at /Users/thisuser/anaconda3:
#
pillow 4.1.1 py35_0
In Python3 I can import PIL. Python2.7 I still get No module named PIL. Grateful for assistance. Is my pip/pip2 configured incorrectly?
Try by giving version
pip install pillow==6.1.0(latest)
If Doesn't work try
pip list
If not listed search location of python
which python
Search for site-packages folder inside resultant location of 'python' (usually under lib/python3.5/site-packages) and check if PIL present or not(packages are not installing right location)
Latest Jython standalone (2.7 final), latest setuptools:
C:\projects_intellij\test_jython>jython.bat ez_setup.py
C:\projects_intellij\test_jython>java -jar "C:\projects_intellij\test_jython\jython-standalone-2.7.0.jar" ez_setup.py
Extracting in C:\Users\myuser\AppData\Local\Temp\tmpt_1anc
Now working in C:\Users\myuser\AppData\Local\Temp\tmpt_1anc\setuptools-21.2.2
Installing Setuptools
Traceback (most recent call last):
File "ez_setup.py", line 425, in <module>
sys.exit(main())
File "ez_setup.py", line 422, in main
return _install(archive, _build_install_args(options))
File "ez_setup.py", line 59, in _install
if not _python_cmd('setup.py', 'install', *install_args):
File "ez_setup.py", line 51, in _python_cmd
return subprocess.call(args) == 0
File "C:\projects_intellij\test_jython\jython-standalone-2.7.0.jar\Lib\subprocess.py", line 500, in call
File "C:\projects_intellij\test_jython\jython-standalone-2.7.0.jar\Lib\subprocess.py", line 830, in __init__
File "C:\projects_intellij\test_jython\jython-standalone-2.7.0.jar\Lib\subprocess.py", line 1311, in _execute_child
TypeError: args must contain only strings
Is there a way to install this using Jython? Should I have used Jython installed by the installer instead of standalone?
Platform: Win 7 x64.
Yes, I think you should have.
It looks like a version problem.
Same here:
https://sourceforge.net/p/jython/mailman/jython-users/thread/CAOhO%3DaNmNL6xeKES2JXPkg%2BP3OTBxJCESNA0YtfLVX1L1fv85w#mail.gmail.com/
This question already has answers here:
Unable to install Flask-Mail
(2 answers)
Closed 6 years ago.
Whenever I run the command pip install Django I get the following error trace which means there is some version conflict. I tried uninstalling and then installing the same package, but it's throwing up the same error.
Downloading/unpacking bcrypt (from Django)
Downloading bcrypt-2.0.0.tar.gz
Running setup.py (path:/tmp/pip_build_root/bcrypt/setup.py) egg_info for package bcrypt
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/bcrypt/setup.py", line 226, in <module>
**keywords_with_side_effects(sys.argv)
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg/setuptools/dist.py", line 225, in __init__
_Distribution.__init__(self,attrs)
File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg/setuptools/dist.py", line 257, in finalize_options
ep.require(installer=self.fetch_build_egg)
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 2029, in require
working_set.resolve(self.dist.requires(self.extras),env,installer))
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 592, in resolve
raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (certifi 2016.2.28 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('certifi==2015.11.20'))
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/bcrypt/setup.py", line 226, in <module>
**keywords_with_side_effects(sys.argv)
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg/setuptools/dist.py", line 225, in __init__
_Distribution.__init__(self,attrs)
File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg/setuptools/dist.py", line 257, in finalize_options
ep.require(installer=self.fetch_build_egg)
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 2029, in require
working_set.resolve(self.dist.requires(self.extras),env,installer))
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 592, in resolve
raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (certifi 2016.2.28 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('certifi==2015.11.20'))
----------------------------------------
Cleaning up...
I am using Python 2.7. Anybody knows what is the issue?
It seems like all the problem is because of certifi version conflict
so try downloading the source from here
https://pypi.python.org/pypi/certifi
and install from source
Extract it go into the folder and run this command
sudo python setup.py install
and it should work
peace
I met such a situation when I had already used system package manager like aptitude or pacman to install that very package, or dependency package
(they, pip and system package manager, do not know each other, while they install package at the same folder, some site-package thing, so it's easy to get a file already exist like problem)
You need to see which is conflict, open your python console, try to import it, and see where is it with module_name.file, remove it(or the folder) manually (please backup before problem really solved).
Or just use pip and system package manager to verify which has been already installed