OSX ld: library not found for -lssl

I had the same issue after upgrading to osx Mojave, and on python 3.7.2. This is what worked for me: # Required for mysqlclient, see brew info openssl echo ‘export PATH=”/usr/local/opt/openssl/bin:$PATH”‘ >> ~/.bash_profile export LDFLAGS=”-L/usr/local/opt/openssl/lib” export CPPFLAGS=”-I/usr/local/opt/openssl/include” pip3 install mysqlclient Hope it helps. For more see here.

Running OpenCV from a Python virtualenv

Fired up a virtualenv and followed this guide: http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/ , up until manipulating and copying the cv shared objects. Instead, I copied cv.so (from my OpenCV-2.2.0/lib directory) to my virtualenv site-packages (eg. env/lib/python2.7/site-packages/). Once cv.so was in my environment, I was able to import cv within python.

Configuring PyCharm with existing virtualenv

To run PyCharm properly for your project, you need to set Python Interpreter and Python Structure correctly. I had set Python Interpreter correctly but missed out on Python Structure. Go to Pycharm->Preferences->your_project->Project Structure Add the right content root It has nothing to do with your working directory which you can set separately in your debug/run … Read more

setting up environment in virtaulenv using python3 stuck on setuptools, pip, wheel

1.Check your internet connections. 2.Set python3 as your default python interpreter since you have python2.7 as your default python interpreter. Try using without any wheel by: virtualenv venv –no-wheel Then activate virtualenv and run:- pip install –upgrade pip pip install setuptools –no-use-wheel –upgrade pip install wheel –no-cache If you are behind proxy then use:- sudo … Read more

Batch equivalent of “source” on Windows: how to run a Python script from a virtualenv

I’d say you just need to prepend ‘call’ to your activate.bat invocation, to ensure that the current batch file is resumed after activate is executed: call %~dp0env\Scripts\activate.bat Consider doing the same for deactivate.bat. Furthermore, if you want to ensure that the current cmd.exe environment is not polluted by a call to your batch file, consider … Read more

Running subprocess within different virtualenv with python

The accepted answer does not address the problem of ‘activating’ a virtualenv in a subprocess. If you start your application with a call to the python executable, like in your example it is actually very simple: you only have to explicitly point to the executable in the virtualenv. import subprocess subprocess.Popen([“virtualenv1/bin/python”, “my_script.py”]) subprocess.Popen([“virtualenv2/bin/python”, “my_other_script.py”]) will … Read more

A Python script that activates the virtualenv and then runs another Python script?

You can activate your virtualenv and then start server using a bat file. Copy this script in to a file and save it with .bat extension (eg. runserver.bat) @echo off cmd /k “cd /d C:\Users\Admin\Desktop\venv\Scripts & activate & cd /d C:\Users\Admin\Desktop\helloworld & python manage.py runserver” Then you can just run this bat file (just double … Read more

Python Virtualenv – No module named virtualenvwrapper.hook_loader

The issue was solved following the steps below: #switch the /usr/bin/python link to point to current python link cd /usr/bin sudo mv python python.bak sudo ln -s /Library/Frameworks/Python.framework/Versions/Current/bin/python python Re-arrange the export command in order that it is placed before the virtualenv commands in my .bash_profile file: PATH=/Library/Frameworks/Python.framework/Versions/2.7/bin:$PATH export PATH # needed for virtualenvwrapper export … Read more