pip path does not match module search path - python

pip is installing to '/usr/local/lib/python2.7/site-packages', but that path is not in sys.path. How do I permanently tell python to load packages from here? For a temporary solution, I've tried sys.path.append('/usr/local/lib/python2.7/site-packages') but that has no effect.
edit: my error message
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/wy/nplx__q112xcnspm7454nk_h0000gn/T/pip_build_<user>/numpy-stl/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/wy/nplx__q112xcnspm7454nk_h0000gn/T/pip-59wzi0-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/wy/nplx__q112xcnspm7454nk_h0000gn/T/pip_build_<user>/numpy-stl
Storing debug log for failure in /Users/<user>/Library/Logs/pip.log

Related

pip install pyautogui errors in terminal

When I try importing pyautogui it says module not found and on installing it in the command line:
command
pip3 install pyautogui
responce in terminal
Command "D:\pythonp\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\hp\\AppData\\Local\\Temp\\pip-install-1zr0j9qn\\Pillow\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.re
ad().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\hp\AppData\Local\Temp\pip-record-gwxfcxoi\install-record.txt --single-version-externally-managed --compile --install-
headers D:\pythonp\venv\include\site\python3.8\Pillow" failed with error code 1 in C:\Users\hp\AppData\Local\Temp\pip-install-1zr0j9qn\Pillow\
After carefully looking at everything around my project I realized for the imports to work, the python file should be inside the venv folder.

Python 3.7 Scapy install failed

I tried to install Scapy for Python 3.7. I got the following error message which I can not explain.
Used commands: pip install scapy
C:\Users\Frank>Command ""c:\program files (x86)\python37-32\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\Frank\\AppData\\Local\\Temp\\pip-install-a7qfqmx_\\scapy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Frank\AppData\Local\Temp\pip-record-89rwlqnn\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Frank\AppData\Local\Temp\pip-install-a7qfqmx_\scapy\Command ""c:\program files (x86)\python37-32\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\Frank\\AppData\\Local\\Temp\\pip-install-a7qfqmx_\\scapy\\setup.py';f=getattr(tokenize,
'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Frank\AppData\Local\Temp\pip-record-89rwlqnn\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Frank\AppData\Local\Temp\pip-install-a7qfqmx_\scapy\
Has anyone of you had a similar problem and found a suitable solution?
Update: Python 3.7 is supported since Scapy 2.4.2+
The PyPi release does not support Python 3.7
You need to use the development version, over here: https://github.com/secdev/scapy/archive/master.zip
Unzip it and run python setup.py install

how to install install some Python packages, debug log output?

I am trying to execute this instruction:
sudo pip install -r requirements.txt
But I foun this error:
Command /usr/bin/python -c "import setuptools, tokenize;
__file__='/tmp/pip_build_root/pyzmq/setup.py';exec(compile(getattr(tokenize,
'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install
--record /tmp/pip-JB30wJ-record/install-record.txt
--single-version-externally-managed --compile failed with error code 1
in /tmp/pip_build_root/pyzmq
Storing debug log for failure in /home/userrr/.pip/pip.log
I would be very grateful if you could help me please.
Thanks in advance.

Error connecting Python with MySQL

I received a python project and I'm having trouble running its requirements, particularly anything to do with MySQL. Whenever I run pip install mysqlclient, I get 13 warnings and this error in red.
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-eBsQYy/mysqlclient/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-sxHiel-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-eBsQYy/mysqlclient/
When I run pip install mysql-python I get 14 warning with a similar error in red.
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-qW79lT/mysql-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-13maVa-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-qW79lT/mysql-python/
Any ideas?
Try to install “pymysql”. I got the warning as well trying to install MySQL for Python in Python 3. After doing some research, pymysql seems to be what needs to be installed moving forward. Pip install pymysql.

I am not able to install peewee using pycharm terminal. I am using this 'pip install peewee' but can't import the library

Command "C:\Users\asus\Anaconda2\python.exe -u -c "import setuptools, tokenize;file='c:\users\asus\appdata\local\temp\pip-build-54ytkq\peewee\setup.py';
f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record c:\users\asus\appd
ata\local\temp\pip-q5dadg-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\asus\appdata\local\temp\pip-
build-54ytkq\peewee\
It solved actually because microsoft visual c++ for python needs to be installed in my computer
after inatlling that it worked properly

Categories