I've succesfully installed torch with pip in
c:\users\utente\appdata\local\programs\python\python37\lib\site-packages
when I try to import on VSCode that's the error. Any solution?
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\UTENTE\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\__init__.py", line 81, in <module>
ctypes.CDLL(dll)
File "C:\Users\UTENTE\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] Impossibile trovare il modulo specificato
that's my python version:
Python 3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 10:41:24) [MSC
v.1900 64 bit (AMD64)] on win32
any other module in the same directory works fine.
Related
I try to decode pyc python file using python-decompile3.
The file is encrypted by python libs cryptography and bcrypt
This is my command
decompyle3 names.pyc
but i have this error, how to fix it
C:\Users\virtualWin\Desktop\>decompyle3 names.pyc
# decompyle3 version 3.7.6
# Python bytecode 3.9 (3425)
# Decompiled from: Python 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 00:42:30) [MSC v.1916 64 bit (AMD64)]
# Embedded file name: dist\obf\names.py
Traceback (most recent call last):
File "C:\Users\virtualWin\AppData\Local\Programs\Python\Python37\Scripts\decompyle3-script.py", line 11, in <module>
load_entry_point('decompyle3', 'console_scripts', 'decompyle3')()
File "c:\users\virtualwin\desktop\python-decompile3-master (2)\python-decompile3-master\decompyle3\bin\decompile.py", line 190, in main_bin
src_base, out_base, pyc_paths, source_paths, outfile, **options
File "c:\users\virtualwin\desktop\python-decompile3-master (2)\python-decompile3-master\decompyle3\main.py", line 304, in main
do_fragments,
File "c:\users\virtualwin\desktop\python-decompile3-master (2)\python-decompile3-master\decompyle3\main.py", line 222, in decompile_file
compile_mode="exec",
File "c:\users\virtualwin\desktop\python-decompile3-master (2)\python-decompile3-master\decompyle3\main.py", line 140, in decompile
compile_mode=compile_mode,
File "c:\users\virtualwin\desktop\python-decompile3-master (2)\python-decompile3-master\decompyle3\semantics\pysource.py", line 2172, in code_deparse
scanner = get_scanner(version, is_pypy=is_pypy)
File "c:\users\virtualwin\desktop\python-decompile3-master (2)\python-decompile3-master\decompyle3\scanner.py", line 535, in get_scanner
"scan.Scanner%s(show_asm=show_asm)" % v_str, locals(), globals()
File "<string>", line 1, in <module>
File "c:\users\virtualwin\desktop\python-decompile3-master (2)\python-decompile3-master\decompyle3\scanners\scanner39.py", line 36, in __init__
Scanner37Base.__init__(self, 3.9, show_asm)
File "c:\users\virtualwin\desktop\python-decompile3-master (2)\python-decompile3-master\decompyle3\scanners\scanner37base.py", line 101, in __init__
self.opc.END_FINALLY,
AttributeError: module 'xdis.opcodes.opcode_39' has no attribute 'END_FINALLY'
decompyle3 is not support Python 3.9 now.
Please see https://github.com/rocky/python-decompile3/issues/45 and https://github.com/rocky/python-uncompyle6/issues/353
For a long time I'm using a 32-bit python interpreter without a problem. Lately I installed a 64-bit interpreter and installed Anaconda which python has the following info:
Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
When I try to run some code for example
'Import pandas as pd' then I get the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\sveno\Anaconda3\lib\site-packages\pandas\__init__.py", line 13, in <module>
__import__(dependency)
File "C:\Users\sveno\AppData\Roaming\Python\Python37\site-packages\numpy\__init__.py", line 142, in <module>
from . import core
File "C:\Users\sveno\AppData\Roaming\Python\Python37\site-packages\numpy\core\__init__.py", line 23, in <module>
WinDLL(os.path.abspath(filename))
File "C:\Users\sveno\Anaconda3\lib\ctypes\__init__.py", line 356, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is geen geldige Win32-toepassing
Deleting the 32-bit version does not solve the problem
I'm having problems using NanoMsg. I was using default sockets before but then someone pointed out that this was a bad idea. So I searched to get a better package and found NanoMsg. When I tried importing I got this error:
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>>
================= RESTART: C:\Users\user\Desktop\Website.py =================
=============================== RESTART: Shell ===============================
>>> import nanomsg
Warning (from warnings module):
File "C:\Users\user\lib\site-packages\nanomsg_wrappers\__init__.py", line 22
"%s, performance may be affected!") % (default,))
UserWarning: Could not load the default wrapper for your platform: cpy, performance may be affected!
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import nanomsg
File "C:\Users\user\lib\site-packages\nanomsg\__init__.py", line 7, in <module>
from . import wrapper
File "C:\Users\user\lib\site-packages\nanomsg\wrapper.py", line 4, in <module>
_wrapper = _load_wrapper()
File "C:\Users\user\lib\site-packages\nanomsg_wrappers\__init__.py", line 23, in load_wrapper
return importlib.import_module('_nanomsg_ctypes')
File "C:\Users\user\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\user\lib\site-packages\_nanomsg_ctypes\__init__.py", line 10, in <module>
_lib = ctypes.windll.nanomsg
File "C:\Users\user\lib\ctypes\__init__.py", line 417, in __getattr__
dll = self._dlltype(name)
File "C:\Users\user\lib\ctypes\__init__.py", line 347, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
>>>
Any solutions?
I have read that the Raspberry Pi is capable of transmitting FM.
I have downloaded the script and put on the directory "/home/pi/".
Then I have executed following commands in the terminal over putty:
pi#raspberrypi ~ $ sudo python
Python 2.7.3 (default, Mar 18 2014, 05:13:23)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import PiFm
>>> PiFm.play_sound("left_right.wav")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "PiFm.py", line 7, in play_sound
call(["./pifm", filename])
File "/usr/lib/python2.7/subprocess.py", line 493, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
I have ensured that the soundfile "left_right.wav" is in the same directory.
I don't know why this error is throwed.
I use Raspbian as OS, if this is revelant...
EDIT: The files used are in this download: http://cdn.makezine.com/make/pifm/PiRadio.zip
I'm trying to install pyquery on Windows and I get the following error when I try to do selects like this d('p:first'). Everything else seems to be working. Any idea what am I missing? This issue happens only on my windows machine, on my MAC works fine.
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyquery import PyQuery as pq
>>> d = pq("<p></p>")
>>> d('p:first')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\pyquery-1.2.4-py2.7.egg\pyquery\pyquery.py
", line 237, in __call__
result = self.__class__(*args, parent=self, **kwargs)
File "C:\Python27\lib\site-packages\pyquery-1.2.4-py2.7.egg\pyquery\pyquery.py
", line 213, in __init__
xpath = self._css_to_xpath(selector)
File "C:\Python27\lib\site-packages\pyquery-1.2.4-py2.7.egg\pyquery\pyquery.py
", line 223, in _css_to_xpath
return self._translator.css_to_xpath(selector, prefix)
File "build\bdist.win32\egg\cssselect\xpath.py", line 188, in css_to_xpath
File "build\bdist.win32\egg\cssselect\xpath.py", line 188, in <genexpr>
File "build\bdist.win32\egg\cssselect\xpath.py", line 208, in selector_to_xpat
h
File "build\bdist.win32\egg\cssselect\xpath.py", line 230, in xpath
File "build\bdist.win32\egg\cssselect\xpath.py", line 272, in xpath_pseudo
File "C:\Python27\lib\site-packages\pyquery-1.2.4-py2.7.egg\pyquery\cssselectp
atch.py", line 19, in xpath_first_pseudo
xpath.add_post_condition('position() = 1')
AttributeError: 'XPathExpr' object has no attribute 'add_post_condition'
>>>
I had installed pyquery with "easy_install pyquery" and this was causing this error.
I removed it and then installed it from https://github.com/gawel/pyquery with python setup.py install and now it's working.