Install Poppler in windows with python 3 - python

I've been trying to install Poppler using the pip command pip install python-poppler-qt4==0.18.1 but it shows a message like this
Downloading/unpacking python-poppler-qt4==0.18.1
Downloading python-poppler-qt4-0.18.1.tar.gz
Running setup.py (path:C:\Users\BOOMER~1\AppData\Local\Temp\pip_build_Boomerang RMS\python-poppler-qt4\setup.py) egg_info for package python-poppler-qt4
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "C:\Users\BOOMER~1\AppData\Local\Temp\pip_build_Boomerang RMS\python-poppler-qt4\setup.py", line 42, in <module>
import sipdistutils
ImportError: No module named 'sipdistutils'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "C:\Users\BOOMER~1\AppData\Local\Temp\pip_build_Boomerang RMS\python-poppler-qt4\setup.py", line 42, in <module>
import sipdistutils
ImportError: No module named 'sipdistutils'
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in C:\Users\BOOMER~1\AppData\Local\Temp\pip_build_Boomerang RMS\python-poppler-qt4
Storing debug log for failure in C:\Users\Boomerang\pip\pip.log
How can I do this correctly?

Related

python setup.py egg_info error mysqlclient

I just started learning Python using Django and I just seemed to be stuck at the same place for 3 days, every time I try to run the following command in my terminal using Pycharm (Yep, I am using a Mac) I get the below error:
Command: pip install mysqlclient
Error:
Collecting mysqlclient
Using cached mysqlclient-1.3.12.tar.gz
Complete output from command python setup.py egg_info:
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/3z/_xzmzzh90z9dj90cb70p3q0c0000gn/T/pip-build-c7mudszc/mysqlclient/setup.py", line 17, in <module>
metadata, options = get_config()
File "/private/var/folders/3z/_xzmzzh90z9dj90cb70p3q0c0000gn/T/pip-build-c7mudszc/mysqlclient/setup_posix.py", line 44, in get_config
(venv) Mervins-MacBook-Pro:untitled mervinkobola$ pip install mysqlclient
Collecting mysqlclient
Using cached mysqlclient-1.3.12.tar.gz
Complete output from command python setup.py egg_info:
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/3z/_xzmzzh90z9dj90cb70p3q0c0000gn/T/pip-build-w_jamo3b/mysqlclient/setup.py", line 17, in <module>
metadata, options = get_config()
File "/private/var/folders/3z/_xzmzzh90z9dj90cb70p3q0c0000gn/T/pip-build-w_jamo3b/mysqlclient/setup_posix.py", line 44, in get_config
(venv) Mervins-MacBook-Pro:untitled mervinkobola$ pip install mysqlclient
Collecting mysqlclient
Using cached mysqlclient-1.3.12.tar.gz
Complete output from command python setup.py egg_info:
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/3z/_xzmzzh90z9dj90cb70p3q0c0000gn/T/pip-build-xefx4qk7/mysqlclient/setup.py", line 17, in <module>
metadata, options = get_config()
File "/private/var/folders/3z/_xzmzzh90z9dj90cb70p3q0c0000gn/T/pip-build-xefx4qk7/mysqlclient/setup_posix.py", line 44, in get_config
libs = mysql_config("libs_r")
File "/private/var/folders/3z/_xzmzzh90z9dj90cb70p3q0c0000gn/T/pip-build-xefx4qk7/mysqlclient/setup_posix.py", line 26, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
OSError: mysql_config not found
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/3z/_xzmzzh90z9dj90cb70p3q0c0000gn/T/pip-build-xefx4qk7/mysqlclient/
Please help me understand whats going on and how I can solve it. Above all I can't seem to run the following :
python manage.py migrate (as I haven't installed mysqlclient)
Thank you in advance for your assistance.
Sometimes the variable mysql_config is set in the Terminal but not in PyCharm so this is why you're getting this error.
The solution is:
run the PyCharm from the terminal with this command:
/Applications/PyCharm\ CE.app/Contents/MacOS/pycharm
After that (in PyCharm) install the packages you need (probably they are in your requirements.txt, for example the mysqlclient),
Close the program and re-open
Now it should have all the packages installed properly

NameError: name 'execfile' is not defined installing fandjango on Python3

I am trying to install fandjango by using:
pip install fandjango
However I get the error:
Collecting fandjango
Using cached fandjango-4.2.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Apaar\AppData\Local\Temp\pip-build-0j7g1eqn\fandjango\setup.py", line 5, in <module>
execfile('fandjango/version.py')
NameError: name 'execfile' is not defined
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Apaar\AppData\Local\Temp\pip-build-0j7g1eqn\fandjango\
Any help would be greatly appreciated
Fandjango only supports Python2 according to its Pypi entry, and you are using Python3 (Python3 does not have the execfile builtin function).

Python3.4 can't install mysql-python

# pip3.4 install mysql-python
Downloading/unpacking mysql-python
Downloading MySQL-python-1.2.5.zip (108kB): 108kB downloaded
Running setup.py (path:/tmp/pip_build_root/mysql-python/setup.py) egg_info for package mysql-python
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/mysql-python/setup.py", line 13, in <module>
from setup_posix import get_config
File "/tmp/pip_build_root/mysql-python/setup_posix.py", line 2, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
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/mysql-python/setup.py", line 13, in <module>
from setup_posix import get_config
File "/tmp/pip_build_root/mysql-python/setup_posix.py", line 2, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/mysql-python
Storing debug log for failure in /root/.pip/pip.log
MySQL-python 1.2.5 does not support Python 3. The Django 1.7 docs recommend the fork mysqlclient.
Resolved:
pip3.4 install --allow-external mysql-connector-python
Edit settings.py
'ENGINE': 'mysql.connector.django',
Under Centos: yum install mysql-devel
pip3 install mysqlclient
On Ubuntu or Debian, just sudo apt-get install python-mysqldb. It worked for me

pip installing a github library

I'm trying to use https://github.com/Dimitri-Gnidash/django-js-utils
I've tried
ubuntu13:~/Documents/momsplanner/momsite/momsite/bin$ pip install git+https://github.com/Dimitri-Gnidash/django-js-utils.git Downloading/unpacking git+https://github.com/Dimitri-Gnidash/django-js-utils.git Cloning https://github.com/Dimitri-Gnidash/django-js-utils.git to /tmp/pip-ih5kUo-build Running setup.py egg_info for package from git+https://github.com/Dimitri-Gnidash/django-js-utils.git
Traceback (most recent call last):
File "<string>", line 16, in <module>
IOError: [Errno 2] No such file or directory: '/tmp/pip-ih5kUo-build/setup.py'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
IOError: [Errno 2] No such file or directory: '/tmp/pip-ih5kUo-build/setup.py'
---------------------------------------- Command python setup.py egg_info failed with error code 1 in /tmp/pip-ih5kUo-build
So this github library is not meant to be used this way?
It does not have a setup.py, I doubt it is gonna work, you will probably need to clone it and add to your path.
related: PIP install a Python Package without a setup.py file?

pip install [all] not installing dependencies

I am trying to install statsmodels and all its dependencies using pip install statsmodels[all].
Question: Why is it still telling me that there are missing dependencies?
Output:
Downloading/unpacking statsmodels[all]
Using download cache from /Users/mynusername/.pip/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fs%2Fstatsmodels%2Fstatsmodels-0.5.0.tar.gz
Running setup.py egg_info for package statsmodels
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/Users/mynusername/.virtualenvs/datasci/build/statsmodels/setup.py", line 463, in <module>
check_dependency_versions(min_versions)
File "/Users/mynusername/.virtualenvs/datasci/build/statsmodels/setup.py", line 122, in check_dependency_versions
raise ImportError("statsmodels requires patsy. http://patsy.readthedocs.org")
ImportError: statsmodels requires patsy. http://patsy.readthedocs.org
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/Users/mynusername/.virtualenvs/datasci/build/statsmodels/setup.py", line 463, in <module>
check_dependency_versions(min_versions)
File "/Users/mynusername/.virtualenvs/datasci/build/statsmodels/setup.py", line 122, in check_dependency_versions
raise ImportError("statsmodels requires patsy. http://patsy.readthedocs.org")
ImportError: statsmodels requires patsy. http://patsy.readthedocs.org
Because we chose not to necessitate that the packaging tools install the dependencies for you.

Categories

Resources