Installing ReportLab onto Windows 64-bit server - python

I would like to install ReportLab onto a Windows Server 2012 R2 64-bit server from there is no internet access. I using Python 2.79 64-bit.
I went to this page using my workstation (not the server). Clicked on the link for reportlab-3.2.0-cp27-none-win_amd64.whl and thought I would get the .whl file. Instead, I was able to download the reportlab-3.2.0-cp27-none-win_amd64.zip file which contained two folders.
I then copied the zip file over to the server into the D:\Python27\Scripts folder.
What should I do to install ReportLab? I tried "pip install reportlab-3.2.0-cp27-none-win_amd64", but it tried to go out to the internet (which the server doesn't have access to).
Can somebody assist me with some instructions?
Thanks.

Related

I am having difficulty importing code from a server?

I'm working on a project for a client and his code is running on his server. I've tried to download the code so that I can run a local version on my computer. The project is at least 5 years old and runs on Python 2.7.
The problem is I can't run python install -r requirements.txt without running into errors, because some of the files are no longer available. Specifically something called "sorl", "django-page-cms", "mercurial", and a few files the developer hosted on other sites.
If his website is working & the code is functioning on his server, that means there is a working version of these packages stored on the server? How could I find them?
You can try starting python while sshed into the server and doing an import like:
>>> import sorl
>>> sorl.__file__
'/home/jmunsch/PycharmProjects/projectname/venv_ok/lib/python3.6/sorl/__init__.py'
And if the os is the same then rsync the files over.
see:
- Copying files using rsync from remote server to local machine

Docker python requests results in DH KEY TOO SMALL error

I'm trying to setup a python script that uses the requests library to get data from a website. The script works without issues running in a virtual environment on my windows 10 pc or on a azure vm.
However, when I try to create a docker container using the python:3.6-slim image I get DH_KEY_TOO_SMALL errors. Testing the website on ssllabs.com revealed that it supports weak DH key exchange parameters. What could be causing this error and how can I fix it?
I've managed to fix the issue. The problem was caused by openssl versions. Both my windows 10 pc and ubuntu 18.04 vm run an older version that had no problem connecting to the website. The python docker images contain a newer version of openssl that refused to connect.

Problems installing Cloud SQL Proxy on Windows 64-bit

I'm trying to install Cloud SQL Proxy for Google Cloud Platform on my Windows 10 64 bit OS, so I can use Python scripts to dump data into SQL. I'm following this guide to get it set up.
I created a project and a Google Cloud SQL instance from the Console without any issues, and it shows up in the SDK shell without any problems. After downloading the proxy installer and installing it, a dialog window opens up and then closes before I can read it.
When I go to the Google Cloud SDK shell and try to start the Cloud SQL Proxy with: cloud_sql_proxy.exe -instances="[MyInstanceConnectionName]"=tcp:3306
No matter how many times I try, it throws the error "Cloud Sql Proxy is not recognized as an internal or external command, operable program or batch file." I already tried re-downloading and re-executing the file but it still won't work.
I have Python 3.6 with Anaconda and Google Cloud SDK shell installed on Windows 10 64-bit.
When you download the cloud_sql_proxy file make sure to rename it as per instructions in the how to guide. Also make sure you save it in the root directory of where you will run it from. E.g. If you are running the command from C:/users/desktop>.\cloud_sql_proxy.exe -instances="[YOUR_INSTANCE_CONNECTION_NAME]"=tcp:3306 then the cloud_Sql_proxy file must be located in the root C drive.
Open PowerShell or whatever terminal you use and navigate to the folder you saved cloud_sql_proxy.exe then add .\ like so:
.\cloud_sql_proxy.exe -instances="[YOUR_INSTANCE_CONNECTION_NAME]"=tcp:3306
I had the same problem, and i solved it by adding .\ before
so it would be like this
.\cloud_sql_proxy.exe -instances="[YOUR_INSTANCE_CONNECTION_NAME]"=tcp:3306
and I used PowerShell instead of normal cmd
Go to folder where you save proxy exe file and run following command
.\{cloud_sql_proxy file name}.exe -instances={projectID}:{zone}:{sql instance name}:{database}=tcp:{port} -credential_file={service account file path}
For instance related detail go to the instance look for "Instance connection name"
Your command is missing .\ before cloud_sql_proxy.exe -instances="[MyInstanceConnectionName]"=tcp:3306

Unable to install cherrypy on an offline server

Good Morning everyone, I am attempting to install CherryPy on a server without internet access. It has windows Server 2012. I can RDP to it, which is how i have attempted to install it. The server has Python 2.7 installed.
What I have tried (unsuccessfully):
RDP to the server, pip install cherrypy from command line (issue is that it is offline)
Downloaded the .grz files, RDP to server, from CL ran python (source to the setup.py file) install. says that there are dependencies that are unable to be downloaded (because offline).
Downloaded the whl file, attempted to run, did not work.
Is there a way to download the the package, along with all dependencies, on a remote computer (with internet access) and them copy the files over and install? I have attempted to find this information without success.
thank you all for your help.
Ended up copying my entire lib\site-packages folder to the remote server, placed where it would have been on my old server, and it worked fine.
TL:DR copy you %Python_home%/lib/site-packages folder to your remote machine and it might work. need to have the same version of python installed. In my case it was 2.7.

HgLab (Mercurial) on IIS7.5. Http error 500 Access denied when pushing

I am trying to Setup Mercurial on IIS 7.5 on Windows 2008 R2 Standard SP1 64bit.
At first we installed it on a Win 7 machine 32bit with no problem , but moved it to the live server and got user permission issue.
TortoiseHg give teh following error when I Push.
HTTP Error: 500 (Access to the path 'C:\Apps\hglab\Repos\data\repositories\master\CashExpress\Kenya.hg\store\00changelog.i' is denied.)
I had to activate 32bit apps on the 2008 R2 webserver.
I am using HgLab 0.3.10 and TortoiseHg 2.9.2
I am using the Mercurial I downloaded from this site http://hglabhq.com/
I searched the web extensively and also Stack overflow. Most solutions are not for IIS7.5 and those that are for IIS7.5 does not address my problem.
I think it is a user permission issue or 32bit/64bit. Not sure what the user is that Mercurial uses.
I tried grating the anonymous IUSR full access, but no success.
I check the IIS logs and it looks like it is using user "mecurial/proto1.0" which I can't get any information on. I also can't find that user on windows. I presume it is a Python/Apatch user.
If you need any more information I will get it for you.
I am not that familiar with Python or Apache.
I want to use Mecurial and not TFS.

Categories