Ssl and Tkinter Not Present on Source Build of Python 3.5.2, Debian Linux

ImportError: No module named _ssl

Did you build the Python from source? If so, you need the --with-ssl option while building.

Python build finished, but the necessary bits to build these modules were not found

To be honest I would rather use a docker image for Python2 than try to compile it; might be overkill for some but for me it's the easier and cleaner way.

For example if you have a project folder, containing at least project.py and requirements.txt you can use the following Dockerfile (in the same folder as project):

FROM python:2.7-slim-buster

COPY /project /app
RUN pip install --no-cache-dir -r /app/requirements.txt

WORKDIR /app

CMD [ "python", "project.py" ]

Build it with docker build -t project .

Run it with docker run -it --rm --name project_run project

Depending on how complex your application is you can also try to bring it up to date so it will run on Python 3 (there are also automated tools to help you with this).

Pyinstaller builds file but chokes on certain .dlls

Turns out this was an appJar/packaging issue, the pyinstaller was not looking in the correct directory for the assets. per the dev of appJar, I commented out two lines of code in the appJar.py, lines 508-509:

if self.platform == self.WINDOWS:
self.topLevel.wm_iconbitmap(self.appJarIcon)

More on the specifics here: https://github.com/jarvisteach/appJar/issues/84
I probably can fix this by using the --path argument with pyinstaller but for the moment, the issue is fully resolved

How to uninstall a package installed with pip install --user

Having tested this using Python 3.5 and pip 7.1.2 on Linux, the situation appears to be this:

  • pip install --user somepackage installs to $HOME/.local, and uninstalling it does work using pip uninstall somepackage.

  • This is true whether or not somepackage is also installed system-wide at the same time.

  • If the package is installed at both places, only the local one will be uninstalled. To uninstall the package system-wide using pip, first uninstall it locally, then run the same uninstall command again, with root privileges.

  • In addition to the predefined user install directory, pip install --target somedir somepackage will install the package into somedir. There is no way to uninstall a package from such a place using pip. (But there is a somewhat old unmerged pull request on Github that implements pip uninstall --target.)

  • Since the only places pip will ever uninstall from are system-wide and predefined user-local, you need to run pip uninstall as the respective user to uninstall from a given user's local install directory.



Related Topics



Leave a reply



Submit