How can I install external binaries using portable python

0 votes

Hi folks, I can't seem to install python on my computer due to the lack of administrator privileges. None the less I have downloaded portable and I want to install external libraries like Numpy and Scikit learn and stuff. How can I do this?

Sep 7, 2018 in Python by charlie_brown
• 7,720 points
165 views

2 answers to this question.

0 votes

Libraries are normally C extensions and need a compatible C compiler. Installing from external sources is honestly rather difficult on windows. One option is to extract the compiled binary from the installer. 7-Zip is able to open the installer file and you can extract the binary. In a standard Python installation, the extracted binary just needs to be placed in the site-packages directory. If necessary, you can do the extraction on another system and copy the file.

>>> import zipfile
>>> f=zipfile.ZipFile('gmpy2-2.0.0.win-amd64-py3.3.exe','r')
>>> f.namelist()
['PLATLIB/gmpy2-2.0.0-py3.3.egg-info', 'PLATLIB/gmpy2.pyd']
>>> f.extract('PLATLIB/gmpy2.pyd')
'C:\\Python33\\PLATLIB\\gmpy2.pyd'
answered Sep 7, 2018 by ariaholic
• 7,340 points
0 votes
0110100001000101001010101001011010100100111100101001
answered Jan 24 by anonymous
What exactly does your binary code language mean?
01010111 01101000 01111001 00100000 01100010 01101001 01101110 01100001 01110010 01111001 00111111
01010111 01101000 01100001 01110100 00100000 01100100 01101111 00100000 01111001 01101111 01110101 00100000 01110111 01100001 01101110 01110100 00100000 01110100 01101111 00100000 01110011 01100001 01111001 00111111

Related Questions In Python

+2 votes
3 answers

How can I play an audio file in the background using Python?

down voteacceptedFor windows: you could use  winsound.SND_ASYNC to play them ...READ MORE

answered Apr 3, 2018 in Python by charlie_brown
• 7,720 points
2,417 views
+2 votes
2 answers

How can I plot a k-dsitance graph using python?

Hi there, instead of sklearn you could ...READ MORE

answered Apr 10, 2018 in Python by charlie_brown
• 7,720 points
1,414 views
0 votes
1 answer

How can I define a multidimensional array in python using ctype?

Here's one quick-and-dirty method: >>> A = ((ctypes.c_float ...READ MORE

answered Oct 9, 2018 in Python by ariaholic
• 7,340 points
447 views
0 votes
1 answer

How can I rename multiple files in a certain directory using Python?

Use os.rename(src, dst) to rename or move a file ...READ MORE

answered Nov 23, 2018 in Python by ariaholic
• 7,340 points
288 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 399 views
+4 votes
6 answers
0 votes
1 answer

How can I expose callbacks to Fortran using Python

The code that I've written below. The ...READ MORE

answered Aug 23, 2018 in Python by ariaholic
• 7,340 points
187 views
0 votes
1 answer

How can I rename files on the fly using Python?

You could simply use a wrapper object ...READ MORE

answered Sep 7, 2018 in Python by ariaholic
• 7,340 points
53 views