Trouble downloading Pandas, python3 on macOS - python-3.x

I just downloaded python 3.6 after using python 2 for awhile. I need to download my modules for python 3. I started with downloading pandas (unsuccessfully) and I have tried running in my terminal:
$ sudo pip3 install --user pandas
$ pip3 install --user pandas
$ sudo pip3 install pandas
$ pip3 install pandas
I also ran a few more variations trying to play with it. I receive this error at the end of the output for that last attempt:
Collecting pandas
Using cached pandas-0.19.2.tar.gz
Complete output from command python setup.py egg_info:
Download error on https://pypi.python.org/simple/numpy/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages may not be found!
Couldn't find index page for 'numpy' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) -- Some packages may not be found!
No local packages or working download links found for numpy>=1.7.0
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/68/xjx6zfr570199v_w0dhd9y3c0000gn/T/pip-build-v90_t75r/pandas/setup.py", line 696, in <module>
**setuptools_kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/dist.py", line 315, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/dist.py", line 361, in fetch_build_eggs
replace_conflicting=True,
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkg_resources/__init__.py", line 850, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1122, in best_match
return self.obtain(req, installer)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1134, in obtain
return installer(requirement)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/dist.py", line 429, in fetch_build_egg
return cmd.easy_install(req)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 659, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('numpy>=1.7.0')
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/68/xjx6zfr570199v_w0dhd9y3c0000gn/T/pip-build-v90_t75r/pandas/
I am pretty new to python in general so any help would be greatly appreciated. Thank you

Related

Pyautogui-module is not installing with pip3 on Ubuntu 19.10

I'm developing with python 3 and trying to install the pyautogui Module, and to be able to use it I had to install some packages. But I keep getting errors when installing the packages with pip3.
Collecting pyobjc-framework-Quartz
Using cached https://files.pythonhosted.org/packages/a9/af/fb7a7264d3bf0147bdd1d01eeb4e8b1cac90f0613aca336b178771dcdec7/pyobjc-framework-Quartz-6.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-4ukazwoa/pyobjc-framework-Quartz/setup.py", line 67, in <module>
py_limited_api=True,
File "/tmp/pip-install-4ukazwoa/pyobjc-framework-Quartz/pyobjc_setup.py", line 390, in Extension
os_level = get_os_level()
File "/tmp/pip-install-4ukazwoa/pyobjc-framework-Quartz/pyobjc_setup.py", line 200, in get_os_level
with open("/System/Library/CoreServices/SystemVersion.plist", "rb") as fp:
FileNotFoundError: [Errno 2] No such file or directory: '/System/Library/CoreServices/SystemVersion.plist'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-4ukazwoa /pyobjc-framework-Quartz/
Anyone has a idea what the problem is?
Anything related to Objective C, pyobjc and especially pyobjc-framework-Quartz require Mac OS X. You cannot install them at Ubuntu.

Unable to install python 3.7 packages Fiona, lxml, pandas, Pillow in mac 10.14.3

I was trying to install python 3.7 virtualenv packages in my new mac system with runs mac os 10.14.3. But system installation failed due to environment error
Packages:
lxml==3.8.0
Pillow==4.1.1
Fiona==1.7.10.post1
pandas==0.20.2
I Have attached the full crash report in https://pastebin.com/tzMwwHjB
Failed building wheel for Fiona
Failed building wheel for lxml
Failed building wheel for pandas
Failed building wheel for Pillow
Error checking for conflicts.
Traceback (most recent call last):
File "/Users/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2897, in _dep_map
return self.__dep_map
File "/Users/titus/.virtualenvs/julo-ana/lib/python3.7/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/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2888, in _parsed_pkg_info
return self._pkg_info
File "/Users/titus/.virtualenvs/julo-ana/lib/python3.7/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/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 503, in _warn_about_conflicts
package_set, _dep_info = check_install_conflicts(to_install)
File "/Users/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/pip/_internal/operations/check.py", line 108, in check_install_conflicts
package_set, _ = create_package_set_from_installed()
File "/Users/titus/.virtualenvs/julo-ana/lib/python3.7/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/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2635, in requires
dm = self._dep_map
File "/Users/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2899, in _dep_map
self.__dep_map = self._compute_dependencies()
File "/Users/titus/.virtualenvs/julo-ana/lib/python3.7/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/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2890, in _parsed_pkg_info
metadata = self.get_metadata(self.PKG_INFO)
File "/Users/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1410, in get_metadata
value = self._get(self._fn(self.egg_info, name))
File "/Users/titus/.virtualenvs/julo-ana/lib/python3.7/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: '/Users/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/Fiona-1.8.4.dist-info/METADATA'
Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/Users/titus/.virtualenvs/julo-ana/lib/python3.7/site-packages/Fiona-1.8.4.dist-info/RECORD'
Can any one know solution for this. Im trying to fix this for last two days still facing it.
Use the supported version of Python
Try the following:
pip3 install --user package-name (for Python3)
pip install --user package-name (for Python2)
Note: Replace package-name with pandas, lxml, etc

Permission Error in Installing opencv-contrib-python

I am creating a face recognition system using Python and OpenCV on these versions:
Python 3.6.2 (64-bit)
OpenCV 3.3.0
When I try to train the face recognizer:
face_recognizer = cv2.face.createLBPHFaceRecognizer()
and also I tried
face_recognizer = cv2.createLBPHFaceRecognizer()
It gave me attribute error
AttributeError: module 'cv2.cv2' has no attribute 'createLBPHFaceRecognizer'
When I tried
pip install opencv-python
I got these errors
Exception:
Traceback (most recent call last):
File "c:\users\anushi maheshwari\appdata\local\programs\python\python36-32\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\users\anushi maheshwari\appdata\local\programs\python\python36-32\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "c:\users\anushi maheshwari\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
File "c:\users\anushi maheshwari\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "c:\users\anushi maheshwari\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "c:\users\anushi maheshwari\appdata\local\programs\python\python36-32\lib\site-packages\pip\wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "c:\users\anushi maheshwari\appdata\local\programs\python\python36-32\lib\site-packages\pip\wheel.py", line 323, in clobber
shutil.copyfile(srcfile, destfile)
File "c:\users\anushi maheshwari\appdata\local\programs\python\python36-32\lib\shutil.py", line 121, in copyfile
with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: 'c:\\users\\anushi maheshwari\\appdata\\local\\programs\\python\\python36-32\\Lib\\site-packages\\cv2\\cv2.cp36-win32.pyd'
I'd been facing the same issue recently. Here's a list of things that went wrong:
You need to uninstall opencv before installing opencv-contrib
Make sure no console is running that has imported cv2 while you execute your installing process
Run the cmd in Administration Mode (Go to the .exe of the cmd program, right click and select 'Run as Administrator')
This should work.
Hope this helps!
In case of windows, in cmd try to run pip install using python executable
python -m pip install opencv-python
if you're using linux, you just have to give it superuser permission:
sudo -s
pip install opencv-python
note: do not use "su" because it does not recognize the "pip" command
You can use the below command i.e add user to the command
pip install --user opencv-contrib-python

Haystack incompatible with Django 1.10?

while installing django-haystack using PIP with django version==1.10`
Collecting django-haystack
Using cached django_haystack-2.5.0-py2-none-any.whl
Collecting Django<1.10 (from django-haystack)
Using cached Django-1.9.9-py2.py3-none-any.whl
Installing collected packages: Django, django-haystack
Found existing installation: Django 1.10
Uninstalling Django-1.10:
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip-8.1.2-py2.7.egg/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip-8.1.2-py2.7.egg/pip/commands/install.py", line 317, in run
prefix=options.prefix_path,
File "/usr/local/lib/python2.7/dist-packages/pip-8.1.2-py2.7.egg/pip/req/req_set.py", line 736, in install
requirement.uninstall(auto_confirm=True)
File "/usr/local/lib/python2.7/dist-packages/pip-8.1.2-py2.7.egg/pip/req/req_install.py", line 742, in uninstall
paths_to_remove.remove(auto_confirm)
File "/usr/local/lib/python2.7/dist-packages/pip-8.1.2-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/usr/local/lib/python2.7/dist-packages/pip-8.1.2-py2.7.egg/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/usr/lib/python2.7/shutil.py", line 303, in move
os.unlink(src)
OSError: [Errno 13] Permission denied: '/usr/local/bin/django-admin'
Why Uninstalling django 1.10 and even why it can't
Using Ubuntu 16.04
Please Notify me if there is a familiar issue like that or even a question here Thanks
Have you tried installing it with sudo ? You usually need to use sudo to install some dependencies

virtualenv install linux error

I receive a funny error when trying to install virtualenv:
$ pip install virtualenv
yields the following error:
Collecting virtualenv
Using cached virtualenv-15.0.2-py2.py3-none-any.whl
Installing collected packages: virtualenv
Exception:
Traceback (most recent call last):
File "/home/matt/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/matt/.local/lib/python2.7/site-packages/pip/commands/install.py", line 317, in run
prefix=options.prefix_path,
File "/home/matt/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 742, in install
**kwargs
File "/home/matt/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 831, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/home/matt/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 1032, in move_wheel_files
isolated=self.isolated,
File "/home/matt/.local/lib/python2.7/site-packages/pip/wheel.py", line 346, in move_wheel_files
clobber(source, lib_dir, True)
File "/home/matt/.local/lib/python2.7/site-packages/pip/wheel.py", line 324, in clobber
shutil.copyfile(srcfile, destfile)
File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/virtualenv.py'
I was wondering if anybody had some insight as to fixing this? I read that there may be reference in usr/bin to older versions of software, this is possible, but this computer is on the newer side. Is the best bet to go in and clear all references to 'virtualenv' (all that I can find that is
)?
Thank you!
The problem is that you're trying to install a package to a location that typically requires root privileges. You can do as #Vince West suggested and run sudo pip install virtualenv, or you can do pip install --user virtualenv, which will install packages to ~/.local/lib/python<version>/site-packages. If you go that route, you'll likely want to make sure $HOME/.local/bin is included in your $PATH.

Resources