I am trying to execute an exe-file on my Raspberry Pi 3 using Exagear and Wine. When I execute the file, the following error occurs:
ImportError: No module named scrapy
[40] Failed to execute script mimi
fixme:module:load_library unsupported flag(s) used (flags: 0x00000800)
I installed Scrapy in Wine and built the exe with PyInstaller (in wine too).
I even created a file “hooks-data.py” with the content
hiddenimports=[‘pandas._libs.tslibs.timedelta’, ‘scrapy’]
The file is in the same directory as mimi.py. I used the command wine pyinstaller -F --additional-hooks-dir=. mimi.py to build the exe.
Still the exe-file cannot find the module scrapy when executed. Therefore, it seems to me that this is an exagear or a wine issue.
Versions used:
Raspbian-Jesse 8
Exagear-Desktop 2
Wine 2.0
Python 2.7.9
Scrapy 1.5.1
PyInsaller 3.4
edit
The same error occurs with and without Exagear. So error cannot be caused by it.
Related
I am using a Python 2.7 virtualenv with the MySQLdb package installed.
If I run Python from the command line and execute import MySQLdb, this works without error. If I run it from the PyCharm terminal, however, I get an error:
ImportError: libmysqlclient.so.20: cannot open shared object file: No such file or directory
The same pattern occurs if I execute a file test.py containing the line import MySQLdb. It works when executed from the command line and crashed when executed from PyCharm.
I have googled the error and it seems that uninstalling and reinstalling MySQLdb could fix it. But I would like to understand why the error only occurs in PyCharm.
I have made sure that both the command line and the PyCharm terminal use
the same virtual environment (by checking sys.executable)
the same working directory (by checking os.getcwd())
the same path (by checking sys.path)
I have also checked that PYTHONPATH is undefined.
What other difference could there be?
You have to point pycharm to your virtualenv. Go to settings -> project interpreter and give pycharm the path to your python executable. Once there it should work. Note if you have a hybrid WSL/windows setup you will need one virtualenv for WSL and a separate virtualenv for windows/pycharm.
I have got simple pcov.py script in PyCharm using optparse
from optparse import OptionParser
As I understand PyCharm has every project in its own virtual environment. My package has the following packages installed (Project: pcov.py > Project interpreter):
argparse
pip
setuptools
wheel
wsgiref
My project works fine within PyCharm in respect to parsing command line options:
parser = OptionParser(usage=usage)
...
parser.add_option("-z", action="store_true", dest="clean_build",
help="Clean all intermediate files")
...
Sadly, it doesn't when I try to run it standalone (from the command line) saying to me incomprenesible:
./pcov.py -z
[the pcov.py hangs here and I had to kill it with Ctrl-C]
from: can't read /var/mail/optparse
./pcov.py: line 9: syntax error near unexpected token ('
./pcov.py: line 9: def pselect(choices):'
Note that PyCharm never complains of no syntax errors and PyCharm handles -z command line option nicely.
I thought at first that I have to install some more package globally', but I didn't findoptparse' python package (pip search optparse) showed me no exact match.
Thus my questions:
1) What packages I have to install (pip install ) to make my pcov.py script running as it does under PyCharm ?
2) Is there an automated way 'to deliver' the PyCharm working script as a standalone Python script?
Using PyCharm CE 2017.0, Debian 8 jessie, python 2.7
anyone. When I debugging python the code works very well , but when I made it as an
EXE file using pyinstaller :
pyinstaller test.py
when i run the exe file it occurs error is :
No such file or directory:
c:\Db\dist\test\gen\_00020905_0000_0000_C000_000000000046_0_8_4.py
please help
When trying to import gurobipy i get the following ImportError:
D:\Development\Anaconda3\envs\hiwi\python.exe D:/Development/Hiwi/Project_Code_Source/experiment/demo/run.py
Traceback (most recent call last):
File "D:/Development/Hiwi/Project_Code_Source/experiment/demo/run.py", line 2, in <module>
import experiment.demo.scenarios as scenarios
File "D:\Development\Hiwi\Project_Code_Source\experiment\demo\scenarios.py", line 15, in <module>
import framework.simu.ins_gen_v3 as insgen
File "D:\Development\Hiwi\Project_Code_Source\framework\simu\ins_gen_v3.py", line 10, in <module>
from gurobipy import *
File "D:\Development\Anaconda3\envs\hiwi\lib\site-packages\gurobipy\__init__.py", line 1, in <module>
from .gurobipy import *
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden. (English: Module not found.)
Process finished with exit code 1
Since searching google resulted in errors related to environment variables and 64 vs 32 bit Versions i checkt those.
I am running the 64 bit Versions of Annaconda (3.6 using a 2.7 env) on Windows 10 and Gurobi
Gurobi is installed according to this instruction (including the license): http://www.gurobi.com/downloads/get-anaconda
The GUROBI_HOME variable is correctly set to C:\gurobi702\win64 and the Path variable to C:\gurobi702\win64\bin
Python Path variables are set.
Following packages are installed: gurobi 7.5.1, mkl 2017.0.3, numpy 1.13.1, pip 9.0.1, python 2.7.13, setuptools 27.2.0, vs2008_runtime 9.00.30729.5054, wheel 0.29.0, wsgiref 0.1.2
Starting the gurobi console via cmd gurobi works fine.
I reinstalled my complete python environment multiple times and tried restarting after installation.
I got it running with a new conda environment and installing via python setup.py install, as mentioned by Greg Glockner and sascha.
This problem [from .gurobipy import] is caused from the IDE Pycharm on Ubuntu. I am not sure if you may face it with the other IDEs .
First You can make sure from the shell the python has gurobipy installed.
after you installed from the file Gurobi ~\gurobi752\win64
python setup.py install
then just run python from the shell as normal python command
python yourFileName.py and gurobi will works perfectly
In windows 10 i added the path of gurobi to the IDE pycharm
after python setup.py install and pip tool for gurobipy https://sites.google.com/site/pydatalog/python/pip-for-windows, then i added the path
Settings->Project Interpreter-> show all -> interpreter paths -> add your gurobi path
I hope it works cheers ;)
I'm, working on Windows 8 and I receive this error when launching my python program on pycharm:
ImportError: No module named Qwt5
refered to the line: "import PyQt4.Qwt5 as Qwt"
the program always worked till today, and the IDE still suggests me Qwt5 as a module to import when pressing CTRL+SPACE, so it seems is still recognized.
I checked the Qwt5 folder and there is the __init__.py file
I use Python 2.7.9 an is correctly selected as Python Interpreter
I've already tried to remove the packages and reinstall them.
Someone can help me?
i tried this and working.sudo apt-get install python-qwt5-qt4