I've had to reinstall a lot of libraries on Windows. When I want to install pycdc from github
Installing pycdc on windows.
pip install git+https://github.com/zrax/pycdc.git
I get:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\TT\AppData\Local\Temp\pip-ashu2b4z-build\setup.py
C:\Users\TT\unroll>pycdc .py
'pycdc' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\TT\unroll>pip install git+https://github.com/zrax/pycdc.git
Collecting git+https://github.com/zrax/pycdc.git
Cloning https://github.com/zrax/pycdc.git to c:\users\TT\appdata\local\temp\pip-ashu2b4z-build
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\TT\Anaconda3\lib\tokenize.py", line 452, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\TT\\AppData\\Local\\Temp\\pip-ashu2b4z-build\\setup.py'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\TT\AppData\Local\Temp\pip-ashu2b4z-build\
C:\Users\TT\unroll>pip install git+https://github.com/zrax/pycdc.git
I feel like I'm missing some dependency files
Boy do I ever regret doing a re-install. python may be nice to use but a nightmare to setup
Also:
C:\Users\TT>pip install git+ssh://git#github.com/BlahCo/search/tree/prod_release_branch/ProductName
Collecting git+ssh://git#github.com/BlahCo/search/tree/prod_release_branch/ProductName
Cloning ssh://git#github.com/BlahCo/search/tree/prod_release_branch/ProductName to c:\users\TT\appdata\local\temp\pip-6x2kywme-build
The authenticity of host 'github.com (192.30.255.113)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added 'github.com,192.30.255.113' (RSA) to the list of known hosts.
git#github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
Command "git clone -q ssh://git#github.com/BlahCo/search/tree/prod_release_branch/ProductName C:\Users\TT\AppData\Local\Temp\pip-6x2kywme-build" failed with error code 128 in None
It seems you're facing two different issues.
First, for pycdc:
Pycdc does not seems to be a python package so it does make sense to install it with pip (but it's logical that the setup.py was not found)
Checking there github (https://github.com/zrax/pycdc) it appears you need to download there source and build it.
Second, BlahCo:
You're trying to install it downloading there sources via ssh instead of https (like you tried with pycdc). If you try to use ssh, you'll need to configure your github account with your ssh public key.
The error git#github.com: Permission denied (publickey) shows that you did not configure your account correctly
For more details see: https://help.github.com/articles/connecting-to-github-with-ssh/
In your requirements, add the URL with a Personal Token to the github repo.
munch
pprint
coloredlogs
git+https://104360bcf4d8a00198bd355d73110ba75866c3e8:#github.company.com/kubernetes-paas/paas-shared-modules.git#master
Installing will use the https API instead of ssh, since you can't provide the keys.
$ pip3 install -r requirements.txt
Collecting git+https://104360bcf4d8a00198bd355d73110ba75866c3e8:#github.company.com/kubernetes-paas/paas-shared-modules.git#master (from -r requirements.txt (line 6))
Cloning https://104360bcf4d8a00198bd355d73110ba75866c3e8:#github.company.com/kubernetes-paas/paas-shared-modules.git (to master) to /private/var/folders/c8/p20lpvwn1kl7cyk7b282s3x1j2r82f/T/pip-2py7sl6t-build
Related
I would normally install a Python repository from Github using (for example):
pip install git+git://github.com/Artory/drf-hal-json#master
And concordantly, my "requirements.txt" would have git+git://github.com/Artory/drf-hal-json#master in it somewhere.
This failed today. The full traceback is below, but the relevant part is:
The unauthenticated git protocol on port 9418 is no longer supported.
Thanks Microsoft. The traceback points to this link about the update. Most of the page at the link talks about how the update is unlikely to affect many people (thanks again Microsoft), and the rest of it involves cryptography that I'm far too noob to understand. The section titled "git://" simply reads:
On the Git protocol side, unencrypted git:// offers no integrity or
authentication, making it subject to tampering. We expect very few
people are still using this protocol, especially given that you can’t
push (it’s read-only on GitHub). We’ll be disabling support for this
protocol.
This doesn't help me understand how to update my requirements.txt to make it work again. Can you tell me how to update my requirements.txt to make it work again? Full traceback below:
(venv) neil~/Documents/Code/web_app$ pip install git+git://github.com/Artory/drf-hal-json#master
Collecting git+git://github.com/Artory/drf-hal-json#master
Cloning git://github.com/Artory/drf-hal-json (to revision master) to /tmp/pip-req-build-zowfe130
Running command git clone -q git://github.com/Artory/drf-hal-json /tmp/pip-req-build-zowfe130
fatal: remote error:
The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
WARNING: Discarding git+git://github.com/Artory/drf-hal-json#master. Command errored out with exit status 128: git clone -q git://github.com/Artory/drf-hal-json /tmp/pip-req-build-zowfe130 Check the logs for full command output.
ERROR: Command errored out with exit status 128: git clone -q git://github.com/Artory/drf-hal-json /tmp/pip-req-build-zowfe130 Check the logs for full command output.
WARNING: You are using pip version 21.2.4; however, version 22.0.4 is available.
You should consider upgrading via the '/home/neil/Documents/Code/web_app/venv/bin/python -m pip install --upgrade pip' command.
In the URL you give to pip, the git+git says to access a Git repository (the first git) over the unauthenticated git protocol (the second git). Assuming you want to continue to use anonymous access here, you can simply rewrite the command to use git+https instead, which access a Git repository over the secure HTTPS protocol.
So your command would look like this:
$ pip install git+https://github.com/Artory/drf-hal-json#master
I just tested in a VM, and that appears to work. If you have other such URLs, changing the same way should be effective.
I am trying to run OpenCV with PyPy, I tried everything to make it work, but so far I couldn't. Tried downloading opencv-python from its github repository (https://github.com/skvark/opencv-python) and then running setup.py myself, but it gives me this error:
Traceback (most recent call last): File "C:\pypy2.7-v7.1.1-win32\site-packages\skbuild\setuptools_wrap.py", line 578, in setup
cmkr.make(make_args, env=env)
File "C:\pypy2.7-v7.1.1-win32\site-packages\skbuild\cmaker.py", line 481, in make
os.path.abspath(CMAKE_BUILD_DIR())))
An error occurred while building with CMake.
Command:
"cmake" "--build" "." "--target" "install" "--config" "Release" "--"
Source directory:
I:\Dropbox\project\opencv-python
Working directory:
I:\Dropbox\project\opencv-python\_skbuild\win32-2.7\cmake-build
Please see CMake's output for more information.
Tried running the command separately, but also gives me another error:
Error: could not load the cache.
- Also tried some solutions for that cache error but nothing.
I couldn't understand what was the issue, and also couldn't find any CMake output file. Any help is appreciated.
When I try the following on linux, I get nice cmake output. Perhaps you do not have cmake installed and on your path?
virtualenv -p /path/to/pypy2/bin/pypy /tmp/pypy2
source /tmp/pypy2/bin/activate
sudo apt install libtiff-dev libqt4-dev
python setup.py bdist_wheel
I have no idea with installing by pypy, but I can give you some tips to install
1- install with pip:
a- make sure yourself that python directory has write permission
b- open cmd in administrative permission
c- run the command pip install opencv-contrib-python
2- install through whl files, search for python binary files and
install it locally(while installation you should have internet
connection)
I am trying to install pdfminer from GitHub, and I am encountering some errors.
This threw an error:
pip install git+git://github.com/pdfminer/pdfminer.six
This threw an error:
pip install git+https://github.com/pdfminer/pdfminer.six
This threw an error:
git clone https://github.com/pdfminer/pdfminer.six
I googled for a solution online and found the ideas, listed above, from here:
How to install Python package from GitHub?
Those commands seemed to work for several other people, but these don't work for me. I am trying to run these three commands in the Anaconda Prompt. I am using Python 3.6.
Maybe something is not configured correctly on my side, but I can't imagine what it is. Or, is it something else?
BTW, here are the errors that I get:
(base) C:\Users\Excel>pip install https://github.com/pdfminer/pdfminer.six
Collecting https://github.com/pdfminer/pdfminer.six
Downloading https://github.com/pdfminer/pdfminer.six
\ 102kB 1.3MB/s
Cannot unpack file C:\Users\Excel\AppData\Local\Temp\pip-unpack-6kqx4igo\pdfmi
ner.six (downloaded from C:\Users\Excel\AppData\Local\Temp\pip-req-build-2bpsgsh
0, content-type: text/html; charset=utf-8); cannot detect archive format
Cannot determine archive format of C:\Users\Excel\AppData\Local\Temp\pip-req-bui
ld-2bpsgsh0
(base) C:\Users\Excel>pip install git+https://github.com/pdfminer/pdfminer.six
Collecting git+https://github.com/pdfminer/pdfminer.six
Cloning https://github.com/pdfminer/pdfminer.six to c:\users\excel\appdata\loc
al\temp\pip-req-build-iqvj3zbl
Error [WinError 2] The system cannot find the file specified while executing c
ommand git clone -q https://github.com/pdfminer/pdfminer.six C:\Users\Excel\AppD
ata\Local\Temp\pip-req-build-iqvj3zbl
Cannot find command 'git' - do you have 'git' installed and in your PATH?
(base) C:\Users\Excel>git clone https://github.com/pdfminer/pdfminer.six
'git' is not recognized as an internal or external command,
operable program or batch file.
I don't think you're cloning the correct url. You're getting the same "could not unpack" error as the question you linked, hinting that it might be the exact same problem.
Try:
pip install git+https://github.com/pdfminer/pdfminer.six.git
or
pip install git+git://github.com/pdfminer/pdfminer.six.git
Typically git repos end with .git, and when I added it to my clipboard from github that's the url I got.
You could also try pip install pdfminer.six, which I copied directly from their documentation: https://github.com/pdfminer/pdfminer.six/blob/master/README.md
i'm trying to update the pyodbc package from 4.0.16 to 4.0.22.
i dont have internet access on the machine i'm working on so downloaded the file and copied to across the network.
running
pip install S:\Temp\PMCD\pyodbc-4.0.22-py27hc56fc5f_0(1).tar.bz2
results in the following error:
Processing s:\temp\pmcd\pyodbc-4.0.22-py27hc56fc5f_0(1).tar.bz2
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
IOError: [Errno 2] No such file or directory: 'c:\\users\\adm_pa~2\\appdata\\local\\temp\\2\\pip-yf25bd-build\\setup.py'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\adm_pa~2\appdata\local\temp\2\pip-yf25bd-build\
setuptools has already been updated to latest(38.5.1) and pip as well (9.0.1)
i used pip to update setuptools and pip itself (via downloaded whl files), so i dont think pip is an issue.
i already managed to sucessfully upgrade pyodbc on my local machine from 16 to 22, so the whl file i have not sure whats going on.
Any ideas whats going on?
Could i manually unzip the package and place it directly in the site-packages? that didnt seem to do anything.
If your target machine does not have a direct Internet connection you can still install pyodbc by
using another machine to download the appropriate wheel (.whl) file from PyPI,
copying that file to your target machine (via LAN, SneakerNet, ...), and
using pip install <wheel_file_location>
For example,
pip install C:\__tmp\pyodbc-4.0.22-cp27-cp27m-win_amd64.whl
The naming convention for wheel files is described in PEP 491.
The 64-bit wheel files for Windows are tagged as "win_amd64" because that's what the Windows version of distutils reports as the platform:
>>> from distutils import util
>>> distutils.util.get_platform()
'win-amd64'
When trying to install a git repo through pip, for example:
pip install git+https://github.com/kayluhb/django-admin-bootstrapped.git#cms-2.4
it just works. But then when putting that same line in a requirements file (if that matters this requirements file is called from another requirements file) then pip can't find the branch:
Could not find a tag or branch 'cms-2.4 '
What did I miss here? An argument like -e or something?
UPDATE:
I have tried another one without the '#' version:
git+http://github.com/jmoiron/johnny-cache.git
When I manually pip install it, it just works too. But then in the requirements file it fails with:
error: The requested URL returned error: 400 Bad request while accessing http://github.com/jmoiron/johnny-cache.git /info/refs?service=git-upload-pack
fatal: HTTP request failed
Command /usr/bin/git clone -q "http://github.com/jmoiron/johnny-cache.git " /tmp/pip-GE7AOI-build failed with error code 128 in None
Have you tried with git+git instead of git+https?