since AppEngine requires to upload your apps via SSL I tried to install the module on my working laptop.
It is a x64 Win 7 System with Python 2.5.4 x86 installed.
I followed guides such as this one: How to install Python ssl module on Windows?
and also all related links.
But the major problem is, that neither MinGw nor GnuWin seems to really work.
GnuWin is perfectly installed, up to date and has all dependencies it needs to build the SSL module.
But typing in
> "C:\Python25\python.py" setup.py install -c mingw32
just badly fails.
So does "-cmingw32" and "-gnuwin32".
(-cmingw32 obviously fails, because even though MinGW is fully installed MinGw is not regcognized)
"build" instead of install seems to "output" something:
MinGw complains about "ggc no such file or directory", and with GnuWin "it doesn't know how to compile C/C++ on a nt with gnuwin"
This sounds like total garbage to me, because I did everything as described in the tutorials.
I fixed one part of my problem: gcc is now getting recognized by easy_install but AE still complains about the missing SSL module though both, easy_install and python say Pycrypto incl. SSL is successfully installed
easy_install ssl
C:\Users\faits>easy_install ssl
Searching for ssl
Best match: ssl 1.15
Adding ssl 1.15 to easy-install.pth file
Using c:\python25\lib\site-packages
Processing dependencies for ssl
Finished processing dependencies for ssl
easy_install pycrypto
C:\Users\faits>easy_install ssl
Searching for ssl
Best match: ssl 1.15
Adding ssl 1.15 to easy-install.pth file
Using c:\python25\lib\site-packages
Processing dependencies for ssl
Finished processing dependencies for ssl
python
IDLE 1.2.4
>>> import ssl
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import ssl
File "C:\Python25\lib\site-packages\ssl\__init__.py", line 61, in <module>
import _ssl2 # if we can't import it, let the error propagate
ImportError: No module named _ssl2
python
>>> import pycrypto
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
import pycrypto
ImportError: No module named pycrypto
I've summed up all the instructions nicely on the following link. Do check it out.
http://waqasshabbir.tumblr.com/post/18010535789/ssl-module-for-python-2-5-installation-windows-only
Use -c with the build command.
Compare:
$ python setup.py install -c
--compile (-c) compile .py to .pyc [default]
with:
$ python setup.py build -c
--compiler (-c) specify the compiler type
To find out other options , run:
$ python setup.py build --help
Related
I'm using the "import ldap" in a python code. This is on a windows 10 machine.
I installed the python-ldap module
pip3 install python-ldap
Installed the dependencies based on the instructions at Python Can't install packages
Also resolved all the pip deployment issues based on Installing python-ldap in a virtualenv on Windows
I'm now getting the following error when executing the import ldap statement. am I missing something here? Any ideas to resolve it?
thon39\site-packages\ldap\__init__.py", line 34, in <module>
import _ldap
ImportError: DLL load failed while importing _ldap: The specified module could not be found.
Visit the unofficial Python binaries page:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-ldap
Download the appropriate WHL package for your system.
For example, if you're using Python 3.8 on an x64 system, download python_ldap‑3.3.1‑cp38‑cp38‑win_amd64.whl
(hint: do NOT download the +sasl version unless you have the Cyrus SASL code running on your system...)
Start the VirtualEnv for your project, if you're using one (C:\Users\youruser\.virtualenv\YourVirtualEnv\Scripts\activate.bat) -- if you're not, skip this step.
Then run pip3 install C:\Path\To\python_ldap_x.x.x-cpXX-cpXX-winXX.whl and this should install the Python DLL (pyd) file for you.
I really have trouble installing pycurl on my Mac, spent few hours trying solve it but unfortunately I did not find any useful solution.
When I execute: pip install pycurl or pip3.6 install pycurl
I got the following error:
Collecting pycurl
Using cached https://files.pythonhosted.org/packages/e8/e4/0dbb8735407189f00b33d84122b9be52c790c7c3b25286826f4e1bdb7bde/pycurl-7.43.0.2.tar.gz
Complete output from command python setup.py egg_info:
Using curl-config (libcurl 7.54.0)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/7j/6928gb292nq4rscm2nwxbnfr0000gn/T/pip-install-yozxmkui/pycurl/setup.py", line 913, in <module>
ext = get_extension(sys.argv, split_extension_source=split_extension_source)
File "/private/var/folders/7j/6928gb292nq4rscm2nwxbnfr0000gn/T/pip-install-yozxmkui/pycurl/setup.py", line 582, in get_extension
ext_config = ExtensionConfiguration(argv)
File "/private/var/folders/7j/6928gb292nq4rscm2nwxbnfr0000gn/T/pip-install-yozxmkui/pycurl/setup.py", line 99, in __init__
self.configure()
File "/private/var/folders/7j/6928gb292nq4rscm2nwxbnfr0000gn/T/pip-install-yozxmkui/pycurl/setup.py", line 316, in configure_unix
specify the SSL backend manually.''')
__main__.ConfigurationError: Curl is configured to use SSL, but we have not been able to determine which SSL backend it is using. Please see PycURL documentation for how to specify the SSL backend manually.
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/7j/6928gb292nq4rscm2nwxbnfr0000gn/T/pip-install-yozxmkui/pycurl/
Any help would be appreciated.
The previous answer didn't solve it for me exactly. I had to set LDFLAGS and CPPFLAGS first for it to build and thus install properly. brew install openssl alluded to these env vars and what they should be set to:
export LDFLAGS=-L/usr/local/opt/openssl/lib
export CPPFLAGS=-I/usr/local/opt/openssl/include
pip install pycurl --with-openssl
According to the official doc. of pycurl
PycURL requires that the SSL library that it is built against is the same one libcurl, and therefore PycURL, uses at runtime. PycURL’s setup.py uses curl-config to attempt to figure out which SSL library libcurl was compiled against, however this does not always work.
I am not sure if this is the problem you having. But maybe you should try using --with-openssl to specify the SSL library to use.
i'm trying to update the pyodbc package from 4.0.16 to 4.0.22.
i dont have internet access on the machine i'm working on so downloaded the file and copied to across the network.
running
pip install S:\Temp\PMCD\pyodbc-4.0.22-py27hc56fc5f_0(1).tar.bz2
results in the following error:
Processing s:\temp\pmcd\pyodbc-4.0.22-py27hc56fc5f_0(1).tar.bz2
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
IOError: [Errno 2] No such file or directory: 'c:\\users\\adm_pa~2\\appdata\\local\\temp\\2\\pip-yf25bd-build\\setup.py'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\adm_pa~2\appdata\local\temp\2\pip-yf25bd-build\
setuptools has already been updated to latest(38.5.1) and pip as well (9.0.1)
i used pip to update setuptools and pip itself (via downloaded whl files), so i dont think pip is an issue.
i already managed to sucessfully upgrade pyodbc on my local machine from 16 to 22, so the whl file i have not sure whats going on.
Any ideas whats going on?
Could i manually unzip the package and place it directly in the site-packages? that didnt seem to do anything.
If your target machine does not have a direct Internet connection you can still install pyodbc by
using another machine to download the appropriate wheel (.whl) file from PyPI,
copying that file to your target machine (via LAN, SneakerNet, ...), and
using pip install <wheel_file_location>
For example,
pip install C:\__tmp\pyodbc-4.0.22-cp27-cp27m-win_amd64.whl
The naming convention for wheel files is described in PEP 491.
The 64-bit wheel files for Windows are tagged as "win_amd64" because that's what the Windows version of distutils reports as the platform:
>>> from distutils import util
>>> distutils.util.get_platform()
'win-amd64'
I'm trying to install an node-based webserver on a cortax a7 embedded system. The repos is pulled via git and I need to run npm install to install the node modules.
The server uses sqlite3, but the package fails when installing, specifically at the build stage, because python cannot find the tarfile module.
node -v // 4.3.1
npm -v // 2.14.12
root#imx6ul-var-dart:~/gateway-server# npm install
> sqlite3#3.1.1 install /home/root/gateway-server/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
Traceback (most recent call last):
File "./extract.py", line 2, in <module>
import tarfile
ImportError: No module named tarfile
deps/action_before_build.target.mk:13: recipe for target 'Release/obj/gen/sqlite-autoconf-3090100/sqlite3.c' failed
make: *** [Release/obj/gen/sqlite-autoconf-3090100/sqlite3.c] Error 1
make: Leaving directory '/home/root/gateway-server/node_modules/sqlite3/build'
I'm aware that many users experience issues with gyp/node-gyp, but here it seems its actually the python file extract.py that fails, when trying import tarfile ... but this seems to be a core module.
I've not been able to find references to this in my searches and bluntly I'm not a python guy. Ideas?
For anyone finding this after-the-fact, it seems you have to install python-modules package (in my case, with opkg) to get ALL the python standard libraries .... dunno why ... but this brings over tarfile and subsequent dependent zlib
I have installed the Emacs package jedi-emacs using M-x package install
and the following Python packages:
Jedi
EPC
argparse
using:
pip install --install-option="--prefix=~/.my_python_packages/" jedi
pip install --install-option="--prefix=/.my_python_packages/" epc
pip install --install-option="--prefix=/.my_python_packages/" argparse
since I do not have root priviledges.
When I open a Python file, I get the following error in the minibuffer, no matter where I place the cursor:
deferred error : (error Server may raise an error : Traceback (most recent call last):
File "/home/avazquez/.emacs.d/elpa/jedi-20130119.830/jediepcserver.py", line 261, in <module>
)
What could be causing it?
This is with Emacs 24.2.1
I found the solution to my problem. I did not have PYTHONPATH set up correctly (it should include the corresponding paths for /path/to/custom-packages).
For more info on this issue see the corresponding ticket in the package repository for emacs-jedi.