Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (45.3k points)

So I have a virtualenv folder called venv for my python project.

I can run:

venv/bin/pip install -r requirements.txt

Which installs all requirements I need for the project except one, M2Crypto. The only way to install it is through apt-get:

apt-get install python-m2crypto

How can I then add this package installed through apt to venv folder?

1 Answer

0 votes
by (16.8k points)

Try this, it will work:

cp -R /usr/lib/python2.7/dist-packages/M2Crypto /home/richard/hello-project/venv/lib/python2.7/site-packages/

cp -R /usr/lib/python2.7/dist-packages/OpenSSL /home/richard/hello-project/venv/lib/python2.7/site-packages/

Related questions

0 votes
1 answer
asked Nov 21, 2020 in Python by laddulakshana (12.7k points)
0 votes
1 answer
0 votes
1 answer

Browse Categories

...