How do I install opencv-python on pypy3 windows? - python

I'm kind of new in the programming world, and I've heard that pypy3 is 7x faster than python while running code, so I decided to give it a try. I created a bot to farm EXP on the game Yu-Gi-OH! duel links and wanted to run it with pypy3, however I need to install opencv and every time I try to do so I get this error .
commands I ran:
git clone https://github.com/skvark/opencv-python
cd opencv-python
pypy3 setup.py install
Error I got:
Traceback (most recent call last):
File "setup.py", line 457, in <module>
main()
File "setup.py", line 257, in main
cmake_source_dir=cmake_source_dir,
File "C:\Users\Jorge\AppData\Local\pypy3.6-v7.3.3-win32\site packages\skbuild\setuptools_wrap.py", line 625, in setup
cmake_source_dir, skbuild_kw['cmake_install_dir'])
File "setup.py", line 370, in _classify_installed_files_override
raise Exception("Not found: '%s'" % relpath_re)
Exception: Not found: 'python/cv2[^/]*\.pyd'
obs: I'm using windows
Can anyone help me?

Related

opencv python : install in rapberry and failed to find a specific file

i tried to install opencv-python in my raspberry. i tried in many ways, including :
pip install opencv-python
but the process take so much time. (almost 2 hours untill now)
so i tried another way, which is installing from it's tar.gz file. i downloaded the tar.gz file, unarchive that, and run this command :
python setup.py install
with the result is error after 4 hours waiting. the error messages is :
Traceback (most recent call last):
File "setup.py", line 449, in <module>
main()
File "setup.py", line 249, in main
cmake_source_dir=cmake_source_dir,
File "/home/pi/lucky/test_krsbi/lib/python3.7/site-packages/skbuild/setuptools_wrap.py", line 625, in setup
cmake_source_dir, skbuild_kw['cmake_install_dir'])
File "setup.py", line 362, in _classify_installed_files_override
raise Exception("Not found: '%s'" % relpath_re)
Exception: Not found: 'python/cv2[^/]*\.cpython\-37m\-arm\-linux\-gnueabihf\.so'
can you guys help me? i tried many things before this problem happen. but now, i really stuck, no thing in the internet can help me

Installing pip for arcpy

I'm attempting to install pip for arcpy (arcgis 10.2 on windows 7). Running get-pip.py results in the following error message:
X:\python>python get-pip.py
Traceback (most recent call last):
File "get-pip.py", line 20061, in <module>
main()
File "get-pip.py", line 194, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 82, in bootstrap
import pip
File "c:\temp\tmpou5fje\pip.zip\pip\__init__.py", line 26, in <module>
File "c:\temp\tmpou5fje\pip.zip\pip\utils\__init__.py", line 27, in <module>
File "c:\temp\tmpou5fje\pip.zip\pip\_vendor\pkg_resources\__init__.py", line 73, in <module>
File "c:\temp\tmpou5fje\pip.zip\pip\_vendor\packaging\specifiers.py", line 275, in <module>
File "c:\temp\tmpou5fje\pip.zip\pip\_vendor\packaging\specifiers.py", line 373, in Specifier
File "C:\Python27\ArcGIS10.2\Lib\re.py", line 190, in compile
return _compile(pattern, flags)
File "C:\Python27\ArcGIS10.2\Lib\re.py", line 242, in _compile
raise error, v # invalid expression
sre_constants.error: nothing to repeat
Using an administrator command prompt doesn't help. My real goal is to get win32com working under arcpy. I usual just copy the appropriate directories out of c:\python27\lib\site-packages to c:\python27\arcgis10.2\lib\site-packages to install a package under arcpy (why doesn't arcpy come with pip?) but that's not working for win32com, presumably do to a missing dll or other windows specific file.
I would recommend the following:
Get the setuptools module
Get the pip module`
And then run the following in command line (assuming windows)
path-to-python path-to-setuptools install
path-to-python path-to-pip install
I work on a closed network (away from the interwebs of old) and cannot use get-pip.py so I find it best to simply download the actual modules and hard install.
Keep us posted!
Copy get_pip.py to "C:\Python27\ArcGIS10.2", then perform command "python get-pip.py" in the directory.
Note that keep network connected in the process, so that auto-download and setup setuptools,wheels,etc.
Hope that can help you.
Try opening a CMD prompt and typing:
C:\Python27\ArcGIS10.2\python.exe -m pip install -U pip

Python PIP on Ubuntu

When I run python pip on a new brand Ubuntu 15.04 system with all updates installed, I get the following assertion error. This is with Python 2.7.x. I get a very similar result with Python 3.4.x:
➜ pip list
adium-theme-ubuntu (0.3.4)
<...snip...>
pyOpenSSL (0.13.1)
pyserial (2.6)
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 80, in run
self.run_listing(options)
File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 142, in run_listing
self.output_package_listing(installed_packages)
File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 151, in output_package_listing
if dist_is_editable(dist):
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 367, in dist_is_editable
req = FrozenRequirement.from_dist(dist, [])
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 299, in from_dist
assert len(specs) == 1 and specs[0][0] == '=='
AssertionError
I think you should report this as a bug here. I can reproduce it in my Ubuntu 15.04 (64bit). The man page clearly states the pip list and pip3 list commands should simply list the packages, but in both cases they crash with AssertionError before completing.

libgfortran not found when installing scipy using enthought canopy

I am trying to install scipy using enpkg in Enthought Canopy but I am getting this error:
(canopy_env) server 17:10:33 ~ $ enpkg scipy
prefix: /home/user/apps/canopy_env
Traceback (most recent call last):
File "/home/user/apps/canopy_env/bin/enpkg", line 10, in <module>
sys.exit(main())
File "/home/user/apps/Canopy/appdata/canopy-1.1.0.1371.rh5-x86_64/lib/python2.7/site-packages/enstaller/main.py", line 746, in main
install_req(enpkg, req, args) # install (default)
File "/home/user/apps/Canopy/appdata/canopy-1.1.0.1371.rh5-x86_64/lib/python2.7/site-packages/enstaller/main.py", line 395, in install_req
_perform_install()
File "/home/user/apps/Canopy/appdata/canopy-1.1.0.1371.rh5-x86_64/lib/python2.7/site-packages/enstaller/main.py", line 311, in _perform_install
enpkg.execute(actions)
File "/home/user/apps/Canopy/appdata/canopy-1.1.0.1371.rh5-x86_64/lib/python2.7/site-packages/enstaller/enpkg.py", line 279, in execute
self.fetch(egg, force=int(opcode[-1]))
File "/home/user/apps/Canopy/appdata/canopy-1.1.0.1371.rh5-x86_64/lib/python2.7/site-packages/enstaller/enpkg.py", line 455, in fetch
f.fetch_egg(egg, force, self._execution_aborted)
File "/home/user/apps/Canopy/appdata/canopy-1.1.0.1371.rh5-x86_64/lib/python2.7/site-packages/enstaller/fetch.py", line 147, in fetch_egg
self.fetch(egg, execution_aborted)
File "/home/user/apps/Canopy/appdata/canopy-1.1.0.1371.rh5-x86_64/lib/python2.7/site-packages/enstaller/fetch.py", line 30, in fetch
fi, info = self.remote.get(key)
File "/home/user/apps/Canopy/appdata/canopy-1.1.0.1371.rh5-x86_64/lib/python2.7/site-packages/enstaller/store/indexed.py", line 47, in get
return self.get_data(key), self.get_metadata(key)
File "/home/user/apps/Canopy/appdata/canopy-1.1.0.1371.rh5-x86_64/lib/python2.7/site-packages/enstaller/store/indexed.py", line 136, in get_data
raise KeyError("%s: %s" % (e, url))
KeyError: u'HTTP Error 404: NOT FOUND: https://api.enthought.com/eggs/rh5-64/libgfortran-3.0.0-1.egg'
I am using Canopy Express and this package is provided (see this)..
I have tried to install it from pip but, since I have not administration permissions, I am unable to install it..
Edit: the same happens with Pygments package when installing ipython:
appinst-2.1.2-1.egg [fetching]
55 KB [.................................................................]
MarkupSafe-0.18-2.egg [fetching]
26 KB [.................................................................]
...
KeyError: u'HTTP Error 404: NOT FOUND: https://api.enthought.com/eggs/rh5-64/Pygments-1.6.0-1.egg'
Thanks
a few of our free packages had been flagged as "commercial" by mistake. We fixed the problem and you should be able to install them now.
Sorry about the trouble!

Registry error when installing MySQL-python into virtualenv using pip and easy_install

The pip and easy install commands (install MySQL-python) provide the massive error listed below.
I've been looking around for an answer a while now on this site and through google. The recurring answer is to install python dev (pip install python-dev) however the response I receive is "no distributions at all found"
Does anyone know the correct syntax in order to do this? or could someone be kind enough to point out where I'm going wrong.
All help is greatly appreciated. Thanks
C:\virtualenvs\myvirtualenv2\Scripts\pip-script.py run on 04/13/11 16:28:18
Downloading/unpacking mySQL-python
Running setup.py egg_info for package mySQL-python
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "C:\virtualenvs\myvirtualenv2\build\mySQL-python\setup.py", line 15, in <module>
metadata, options = get_config()
File "setup_windows.py", line 7, in get_config
serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key'])
WindowsError: [Error 2] The system cannot find the file specified
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "C:\virtualenvs\myvirtualenv2\build\mySQL-python\setup.py", line 15, in <module>
metadata, options = get_config()
File "setup_windows.py", line 7, in get_config
serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key'])
WindowsError: [Error 2] The system cannot find the file specified
----------------------------------------
Command python setup.py egg_info failed with error code 1
Exception information:
Traceback (most recent call last):
File "C:\virtualenvs\myvirtualenv2\lib\site-packages\pip-1.0-py2.6.egg\pip\basecommand.py", line 126, in main
self.run(options, args)
File "C:\virtualenvs\myvirtualenv2\lib\site-packages\pip-1.0-py2.6.egg\pip\commands\install.py", line 223, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "C:\virtualenvs\myvirtualenv2\lib\site-packages\pip-1.0-py2.6.egg\pip\req.py", line 980, in prepare_files
req_to_install.run_egg_info()
File "C:\virtualenvs\myvirtualenv2\lib\site-packages\pip-1.0-py2.6.egg\pip\req.py", line 216, in run_egg_info
command_desc='python setup.py egg_info')
File "C:\virtualenvs\myvirtualenv2\lib\site-packages\pip-1.0-py2.6.egg\pip\__init__.py", line 255, in call_subprocess
% (command_desc, proc.returncode))
InstallationError: Command python setup.py egg_info failed with error code 1
Try ActivePython:
pypm -E C:\virtualenvs\myvirtualenv2 install mysql-python
no compile orgy. no strange errors. no terror.
Installing mysqldb on windows is tricky. I can install it manually, after downloading and unpacking mySQL-python:
Go to MySQL-python-1.2.3 folder
Edit the file site.cfg
Run regedit in Start > Run and verify the proper path for MySQL, mine looks like SOFTWARE\MySQL AB\MySQL Server 5.1
Uncomment the line registry_key
Set it:
registry_key = SOFTWARE\MySQL AB\MySQL Server 5.1
Run python setup.py install under your virtualenv

Categories

Resources