Conda skeleton pypi fails with pmdarima -- AttributeError numpy disutils - python

I'm trying to install pmdarima package in a conda env as it requires statsmodels <0.12 and I would also like to use statmodels latest release for this project. My understanding is limited, but I first tried
conda skeleton pypi pmdarima
This failed with the same AttributeError related to numpy disutils described below.
Similarly to the questioner in this question: Conda skeleton pypi: ModuleNotFoundError: No module named 'numpy' I was unable to get this to work either.
conda install -n _build numpy
I then tried the advice laid out in the above-linked SO question and ran:
conda skeleton pypi --extra-specs numpy pmdarima
This results in pretty long output but the key piece as far as I can tell is:
Applying patch: '/var/folders/7f/8d7rz34522gcq4z774n9v91r0000gn/T/tmp8tv1gdnxconda_skeleton_pmdarima-1.7.1.tar.gz/pypi-distutils.patch'
patching file core.py
Hunk #1 succeeded at 168 with fuzz 2 (offset 1 line).
Partial import of pmdarima during the build process.
Requirements: ['joblib>=0.11', 'Cython>=0.29,<0.29.18', 'numpy>=1.17.3', 'pandas>=0.19', 'scikit-learn>=0.22', 'scipy>=1.3.2', 'statsmodels>=0.11,<0.12', 'urllib3', 'setuptools<50.0.0']
Setting up with numpy.distutils.core
Traceback (most recent call last):
File "setup.py", line 324, in <module>
do_setup()
File "setup.py", line 320, in do_setup
setup(**metadata)
File "/opt/anaconda3/conda-bld/skeleton_1599410605346/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/lib/python3.7/site-packages/numpy/distutils/core.py", line 130, in setup
if dist.help or not _command_line_ok():
AttributeError: 'NoneType' object has no attribute 'help'
$PYTHONPATH = /var/folders/7f/8d7rz34522gcq4z774n9v91r0000gn/T/tmp8tv1gdnxconda_skeleton_pmdarima-1.7.1.tar.gz/pmdarima-1.7.1
Leaving build/test directories:
Work:
/opt/anaconda3/conda-bld/skeleton_1599410605346/work
Test:
/opt/anaconda3/conda-bld/skeleton_1599410605346/test_tmp
Leaving build/test environments:
Test:
source activate /opt/anaconda3/conda-bld/skeleton_1599410605346/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place
Build:
source activate /opt/anaconda3/conda-bld/skeleton_1599410605346/_build_env
Error: command failed: /opt/anaconda3/conda-bld/skeleton_1599410605346/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/bin/python setup.py install
Any ideas? Thank you so much in advance, very much appreciated!

Not sure what the proper resolution is for the NumPy-based build, but the setup.py does check for an sdist argument, which branches to use setuptools for the build instead of numpy. Hence, the following seems to avoid the code causing the issue:
conda skeleton pypi --setup-options sdist pmdarima
I suspect the downside to this workaround is that there is no Cython compilation done, but not totally sure.
You may want to file an issue on the pmdarima GitHub to see if any of the devs have ideas. Otherwise, it might just be more efficient to pip install the package in the environment you want it (as long as that environment is not base).

#merv thank you for your help! Interestingly, this works for the skeleton, but fails when running conda-build with the following (truncated until the errors) output:
0 location(s) to search for versions of sdist:
Given no hashes to check 0 links for project 'sdist': discarding no candidates
ERROR: Could not find a version that satisfies the requirement sdist (from versions: none)
ERROR: No matching distribution found for sdist
Exception information:
Traceback (most recent call last):
File "$PREFIX/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 216, in _main
status = self.run(options, args)
File "$PREFIX/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 182, in wrapper
return func(self, options, args)
File "$PREFIX/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 325, in run
reqs, check_supported_wheels=not options.target_dir
File "$PREFIX/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 183, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "$PREFIX/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 388, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "$PREFIX/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 339, in _get_abstract_dist_for
self._populate_link(req)
File "$PREFIX/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 305, in _populate_link
req.link = self._find_requirement_link(req)
File "$PREFIX/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 270, in _find_requirement_link
best_candidate = self.finder.find_requirement(req, upgrade)
File "$PREFIX/lib/python3.7/site-packages/pip/_internal/index/package_finder.py", line 928, in find_requirement
req)
pip._internal.exceptions.DistributionNotFound: No matching distribution found for sdist
Removed build tracker: '/private/tmp/pip-req-tracker-umxriyi2'
Traceback (most recent call last):
File "/opt/anaconda3/bin/conda-build", line 11, in <module>
sys.exit(main())
File "/opt/anaconda3/lib/python3.7/site-packages/conda_build/cli/main_build.py", line 474, in main
execute(sys.argv[1:])
File "/opt/anaconda3/lib/python3.7/site-packages/conda_build/cli/main_build.py", line 465, in execute
verify=args.verify, variants=args.variants)
File "/opt/anaconda3/lib/python3.7/site-packages/conda_build/api.py", line 210, in build
notest=notest, variants=variants)
File "/opt/anaconda3/lib/python3.7/site-packages/conda_build/build.py", line 3036, in build_tree
notest=notest,
File "/opt/anaconda3/lib/python3.7/site-packages/conda_build/build.py", line 2155, in build
cwd=src_dir, stats=build_stats)
File "/opt/anaconda3/lib/python3.7/site-packages/conda_build/utils.py", line 407, in check_call_env
return _func_defaulting_env_to_os_environ('call', *popenargs, **kwargs)
File "/opt/anaconda3/lib/python3.7/site-packages/conda_build/utils.py", line 387, in _func_defaulting_env_to_os_environ
raise subprocess.CalledProcessError(proc.returncode, _args)
subprocess.CalledProcessError: Command '['/bin/bash', '-o', 'errexit', '/opt/anaconda3/conda-bld/pmdarima_1599500058832/work/conda_build.sh']' returned non-zero exit status 1.
I'll confess we're well above my head at this point, (do I need to edit the meta.yaml file somehow? Is that crazy?) but will try opening an issue as you suggested, once again really appreciate it.

Related

python3 -m build gives ModuleNotFoundError: No module named 'pathlib2'

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.

Python Pylenium package installation failure: "AttributeError: 'Scheme' object has no attribute 'conftest.py'"

Trying to install package with following command and got an error
pip install pyleniumio
ERROR: Exception:
Traceback (most recent call last):
File "c:\users\mi\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\cli\base_command.py", line 188, in _main
status = self.run(options, args)
File "c:\users\mi\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\cli\req_command.py", line 185, in wrapper
return func(self, options, args)
File "c:\users\mi\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\commands\install.py", line 407, in run
use_user_site=options.use_user_site,
File "c:\users\mi\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\req\__init__.py", line 71, in install_given_reqs
**kwargs
File "c:\users\mi\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\req\req_install.py", line 811, in install
direct_url=direct_url,
File "c:\users\mi\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\install\wheel.py", line 630, in install_wheel
direct_url=direct_url,
File "c:\users\mi\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\install\wheel.py", line 452, in install_unpacked_whee
l
dest = getattr(scheme, subdir)
AttributeError: 'Scheme' object has no attribute 'conftest.py'
Some python packages require other ways, for example, the POT package requires a specific C++ compiler to install. Make sure you read the entire instructions and have everything you need. Another thing that works for me if you have all the requirements and you are running Linux like me, you can just simply lead your terminal to where the file is and just run for example python package.py and it installs. Hopefully, this helped you and you can install your package.

pip._vendor.pep517.wrappers.BackendUnavailable error while installing cryptography

I'm trying to install cryptography to my system, but I get this error:
WARNING: Missing build requirements in pyproject.toml for cryptography from https://files.pythonhosted.org/packages/07/ca/bc827c5e55918ad223d59d299fff92f3563476c3b00d0a9157d9c0217449/cryptography-2.6.1.tar.gz#sha256=26c821cbeb683facb966045e2064303029d572a87ee69ca5a1bf54bf55f93ca6.
WARNING: The project does not specify a build backend, and pip cannot fall back to setuptools without 'setuptools>=40.8.0' and 'wheel'.
Getting requirements to build wheel ... done
ERROR: Exception:
Traceback (most recent call last):
File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 178, in main
status = self.run(options, args)
File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 352, in run
resolver.resolve(requirement_set)
File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/resolve.py", line 131, in resolve
self._resolve_one(requirement_set, req)
File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/resolve.py", line 294, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/resolve.py", line 242, in _get_abstract_dist_for
self.require_hashes
File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 368, in prepare_linked_requirement
abstract_dist.prep_for_dist(finder, self.build_isolation)
File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 175, in prep_for_dist
self.install_backend_dependencies(finder=finder)
File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 123, in install_backend_dependencies
reqs = req.pep517_backend.get_requires_for_build_wheel()
File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.py", line 71, in get_requires_for_build_wheel
'config_settings': config_settings
File "/data/packages/usr/local/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.py", line 162, in _call_hook
raise BackendUnavailable
pip._vendor.pep517.wrappers.BackendUnavailable
This is my setup:
Alpine Linux 3.6.2
Python 3.6.3
pip 19.1
wheel 0.33.1
setuptools 41.0.1
Any idea what could be the problem, or how to solve it?
Thanks for the help in advance!
I did not find any uniform solution to this problem. You can try the following troubleshooting steps. one of them should work.
Upgrade the pip version.
Change the library/package version.
If you are installing from source, try a different .whl package or use tar.gz.
Use --no-use-pep517 with your pip install command (didn't work for me though, but I see it worked for some).
I got the same error with a different library and --no-use-pep517 did not help. However this did:
python -m pip install --upgrade pip

Issues installing python package Six (to install Pip)

We recently uninstalled pip to do some cleanup on Mac OS X El Capitan. Now trying to re-install pip.
$ sudo easy_install pip
Traceback (most recent call last):
File "/usr/local/bin/easy_install", line 11, in <module>
sys.exit(main())
File "/Library/Python/2.7/site-packages/setuptools/command/easy_install.py", line 2270, in main
**kw
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/Library/Python/2.7/site-packages/setuptools/dist.py", line 321, in __init__
_Distribution.__init__(self, attrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/Library/Python/2.7/site-packages/setuptools/dist.py", line 389, in finalize_options
ep.require(installer=self.fetch_build_egg)
File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 2324, in require
items = working_set.resolve(reqs, env, installer, extras=self.extras)
File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 859, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (six 1.4.1 (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python), Requirement.parse('six>=1.6.0'))
Looks like we need to upgrade Six. So:
$ easy_install --upgrade six
Traceback (most recent call last):
File "/usr/local/bin/easy_install", line 11, in <module>
sys.exit(main())
File "/Library/Python/2.7/site-packages/setuptools/command/easy_install.py", line 2270, in main
**kw
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/Library/Python/2.7/site-packages/setuptools/dist.py", line 321, in __init__
_Distribution.__init__(self, attrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/Library/Python/2.7/site-packages/setuptools/dist.py", line 389, in finalize_options
ep.require(installer=self.fetch_build_egg)
File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 2324, in require
items = working_set.resolve(reqs, env, installer, extras=self.extras)
File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 859, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (six 1.4.1 (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python), Requirement.parse('six>=1.6.0'))
Now it looks like we need to upgrade Six in order to upgrade Six??? Maybe it's just a permissions issue:
$sudo easy_install --upgrade six
Traceback (most recent call last):
File "/usr/local/bin/easy_install", line 11, in <module>
sys.exit(main())
File "/Library/Python/2.7/site-packages/setuptools/command/easy_install.py", line 2270, in main
**kw
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/Library/Python/2.7/site-packages/setuptools/dist.py", line 321, in __init__
_Distribution.__init__(self, attrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/Library/Python/2.7/site-packages/setuptools/dist.py", line 389, in finalize_options
ep.require(installer=self.fetch_build_egg)
File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 2324, in require
items = working_set.resolve(reqs, env, installer, extras=self.extras)
File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 859, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (six 1.4.1 (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python), Requirement.parse('six>=1.6.0'))
Nope. Same error.
I'm obviously missing something. Can someone shed some light on this?
Tried the first answer:
$ python get-pip.py
Collecting pip
Using cached pip-9.0.1-py2.py3-none-any.whl
Collecting wheel
Using cached wheel-0.29.0-py2.py3-none-any.whl
Installing collected packages: pip, wheel
Exception:
Traceback (most recent call last):
File "/var/folders/23/49gg72xd4wb1qps4z5j9vbz80000gy/T/tmpz5ckOD/pip.zip/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/var/folders/23/49gg72xd4wb1qps4z5j9vbz80000gy/T/tmpz5ckOD/pip.zip/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/var/folders/23/49gg72xd4wb1qps4z5j9vbz80000gy/T/tmpz5ckOD/pip.zip/pip/req/req_set.py", line 784, in install
**kwargs
File "/var/folders/23/49gg72xd4wb1qps4z5j9vbz80000gy/T/tmpz5ckOD/pip.zip/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/var/folders/23/49gg72xd4wb1qps4z5j9vbz80000gy/T/tmpz5ckOD/pip.zip/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/var/folders/23/49gg72xd4wb1qps4z5j9vbz80000gy/T/tmpz5ckOD/pip.zip/pip/wheel.py", line 247, in move_wheel_files
prefix=prefix,
File "/var/folders/23/49gg72xd4wb1qps4z5j9vbz80000gy/T/tmpz5ckOD/pip.zip/pip/locations.py", line 140, in distutils_scheme
d = Distribution(dist_args)
File "/Library/Python/2.7/site-packages/setuptools/dist.py", line 321, in __init__
_Distribution.__init__(self, attrs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/Library/Python/2.7/site-packages/setuptools/dist.py", line 389, in finalize_options
ep.require(installer=self.fetch_build_egg)
File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 2324, in require
items = working_set.resolve(reqs, env, installer, extras=self.extras)
File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 859, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
VersionConflict: (six 1.4.1 (/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python), Requirement.parse('six>=1.6.0'))
Python 2.7.9+ and 3.4+
Good news! Python 3.4 (released March 2014) and Python 2.7.9 (released December 2014) ship with Pip. This is the best feature of any Python release. It makes the community's wealth of libraries accessible to everyone. Newbies are no longer excluded from using community libraries by the prohibitive difficulty of setup. In shipping with a package manager, Python joins Ruby, Node.js, Haskell, Perl, Go--almost every other contemporary language with a majority open-source community. Thank you Python.
Of course, that doesn't mean Python packaging is problem solved. The experience remains frustrating. I discuss this in Stack Overflow question Does Python have a package/module management system?.
And, alas for everyone using Python 2.7.8 or earlier (a sizable portion of the community). There's no plan to ship Pip to you. Manual instructions follow.
Python 2 ≤ 2.7.8 and Python 3 ≤ 3.3
Flying in the face of its 'batteries included' motto, Python ships without a package manager. To make matters worse, Pip was--until recently--ironically difficult to install.
Official instructions
Per https://pip.pypa.io/en/stable/installing/#do-i-need-to-install-pip:
Download get-pip.py, being careful to save it as a .py file rather than .txt. Then, run it from the command prompt:
python get-pip.py
You possibly need an administrator command prompt to do this. Follow Start a Command Prompt as an Administrator (Microsoft TechNet).
Alternative instructions
The official documentation tells users to install Pip and each of its dependencies from source. That's tedious for the experienced, and prohibitively difficult for newbies.
For our sake, Christoph Gohlke prepares Windows installers (.msi) for popular Python packages. He builds installers for all Python versions, both 32 and 64 bit. You need to
Install setuptools
Install pip
For me, this installed Pip at C:\Python27\Scripts\pip.exe. Find pip.exe on your computer, then add its folder (for example, C:\Python27\Scripts) to your path (Start / Edit environment variables). Now you should be able to run pip from the command line. Try installing a package:
pip install httpie
There you go (hopefully)! Solutions for common problems are given below:
Proxy problems
If you work in an office, you might be behind a HTTP proxy. If so, set the environment variables http_proxy and https_proxy. Most Python applications (and other free software) respect these. Example syntax:
http://proxy_url:port
http://username:password#proxy_url:port
If you're really unlucky, your proxy might be a Microsoft NTLM proxy. Free software can't cope. The only solution is to install a free software friendly proxy that forwards to the nasty proxy. http://cntlm.sourceforge.net/
Unable to find vcvarsall.bat
Python modules can be part written in C or C++. Pip tries to compile from source. If you don't have a C/C++ compiler installed and configured, you'll see this cryptic error message.
Error: Unable to find vcvarsall.bat
You can fix that by installing a C++ compiler such as MinGW or Visual C++. Microsoft actually ship one specifically for use with Python. Or try Microsoft Visual C++ Compiler for Python 2.7.
Often though it's easier to check Christoph's site for your package.

Unable to install any packages using easy_install [duplicate]

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

Categories