Python, pymesh install problem on windows10 - python-3.x

Hi I'm a Python newbie trying to program python using pymesh library but I cant get it to install properly.
Accordijng to attached image I have installed it, and the package says its for 3.8.x and I have python 3.8.2 installed.
pymesh installation instructions (https://pymesh.readthedocs.io/en/latest/installation.html) say to run a test after installing the package. The test fails.
(work) (base) D:\Downloads\HoleCutter>python -c "import pymesh; pymesh.test()"
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: module 'pymesh' has no attribute 'test'
I dont have the resources/capability to 'build packages with cmake'
screen snap from command prompt window

The reason is the PyMesh library isn't kept up to date on PIP, instead you have to use Docker or compile it yourself. This problem is covered by the following issue on Github, however no action has been taken for years: https://github.com/PyMesh/PyMesh/issues/94

Have you tried "pip install pymesh" or "pipx.x install pymesh"?
I think the instructions in the link you provided are for Linux and Mac OS. You can look at this link: ImportError: No module named PyMesh

Related

Python 3 Windows install giving package error ModuleNotFoundError

I have recently started using Python and have installed version 3.7.3 on my Windows 10 machine running as administrator. I then ran the following command in a command prompt to install the xmpppy package
python -m pip install xmpppy
Next I created the following base.py file that uses the aforementioned xmpppy package
#!/usr/bin/env python
import xmpp
user="user"
password="pword"
server="server"
jid = xmpp.JID(user)
connection = xmpp.Client(server,debug=[])
connection.connect()
result = connection.auth(jid.getNode(), password,"LFY-client")
connection.sendInitPresence()
while connection.Process(1):
pass
Now when I run the command
python base.py
in the folder that the base.py file exists I get the following error message:
Traceback (most recent call last):
File "base.py", line 3, in <module>
import xmpp
File "C:\Users\AGO109\AppData\Local\Programs\Python\Python37\lib\site-packages\xmpp\__init__.py", line 29, in <module>
import simplexml,protocol,debug,auth,transports,roster,dispatcher,features,browser,filetransfer,commands
ModuleNotFoundError: No module named 'simplexml'
In the folder C:\Users\AGO109\AppData\Local\Programs\Python\Python37\lib\site-packages\xmpp simplexml.py, protocol.py etc. all exist and the windows system variables contain the paths for python and packages, so what's the problem?
I'm facing same issue.
Try installing each of the packages using command like pip install simplexml and then run your code. Mine is stuck at installing transports.
Alternately,you may try switching to using sleekxmpp that comes bundled with your python installation. As sleekxmpp has latest version published in 2017 compared to that of 2006 for xmpppy, i'm planning to stick with using sleekxmpp library. If you update your code to use sleekxmpp as per the boilerplate code at https://pypi.org/project/sleekxmpp/, XMPP connections work.

python module not found error

This question has been asked a few times, but the remedy appears to complicated enough that I'm still searching for a user specific solution.
I recently installed Quandl module using pip command. Even after successful installation my python idle is still showing
Traceback (most recent call last):
File "F:\Python36\Machine Learning\01.py", line 3, in <module>
import Quandl
ModuleNotFoundError: No module named 'Quandl'
I have used import command in my code.
I am using python 3.6.1 version.
I am working on a windows 10 Desktop.
I have also tried re-installation of module.
You can better navigate to your python scripts folder and open a command window there and try pip3 install quandl .Hope this helps.

python-escpos windows giving "bugtrack_url" error

Trying to install python-escpos library. The instructions say the following:
Ensure the library is installed on ${lib_arch}/${python_ver}/site-packages/escpos
On CLi you must run:
python setup.py build
sudo python setup.py install
What does ${lib_arch}/${python_ver}/ mean? Is it the path such as
\Users\RickT\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\escpos?
When I run python setup.py build, I get the following error:
C:\Users\RickT\AppData\Local\Programs\Python\Python36-32\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg)Traceback (most recent call last):
File "setup.py", line 140, in <module> 'python-escpos = escpos.cli:main'
As I wrote in the comments you should write which version of the documentation you are using and which version of the codebase you are using.
The "error" considering the bugtrack_url is just a warning because setuptools does not know this token. This should not affect your setup in any way. You probably installed it successfully.
Concerning your question about the path: ${lib_arch}/${python_ver}/site-packages/escpos is more or less non-sense in a Windows-context. This just means your location of the site-packages-directory. So, your assumption is right.
All in all the probably easiest solution for you would be installing with pip. This would simply be - considering you have a working pip - a one-liner:
pip install python-escpos

virtualenv can't find modules

So I had been working with virtualenvs a couple months ago but had to stop for a while and now I don't seem to be able to get it working again.
Here is what I did
D:\CS\Python_Projects\HomeCenter>venv\Scripts\activate
(venv) D:\CS\Python_Projects\HomeCenter>pip freeze
You are using pip version 6.0.8, however version 7.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Flask==0.10.1
Flask-SQLAlchemy==2.0
itsdangerous==0.24
Jinja2==2.8
MarkupSafe==0.23
SQLAlchemy==1.0.8
waitress==0.8.9
Werkzeug==0.10.4
(venv) D:\CS\Python_Projects\HomeCenter>server.py
Traceback (most recent call last):
File "D:\CS\Python_Projects\HomeCenter\server.py", line 3, in <module>
from waitress import serve
ImportError: No module named 'waitress'
(venv) D:\CS\Python_Projects\HomeCenter>
Same happens if I were to run app.py, it won't find flask. I have been using PyCharm and when I check there it tells me the interpreter is pointing towards 3.4.2 virtualenv at D:\CS\Python_Projects\HomeCenter\venv
So why can't it find the modules?
Oh contents of server.py in case it's relevant
from waitress import serve
import os
from app import app
port = int(os.environ.get('PORT', 9999))
serve(app, host='0.0.0.0', port=port)
Hello I am korean student so I can't English not well. Please understand.
In my case, I have a well operated program but suddenly occured "not found" error like you after update mac os to BigSur.
but I finally found solution.
when before update I compiled by "source venv/fileName.py" but after update I compile by "python3 venv/fileName.py" then well operate
You try it too.
A couple of things could have happened here:
Use which python and which pip to check if both are from the virtual env itself.
As dirn suggested in the comments, it might be a PATH mixup. The packages were installed in the virtual environment but the script was executed from outside the environment interpreter. (Use venv\Scripts\python.exe <filename.py> instead of just filename to execute).

Using virtualenv with python3 in openSuSE

I am experiencing a problem when using virtualenv in openSuSE 12.3 with Python3:
I installed the python3 and python3-devel packages.
Then I installed the newest distribute and pip and finally virtualenv using pip.
When I try to create a virtualenv I get the following error:
$ virtualenv-3.3 venv01
Using base prefix '/usr'
New python executable in venv01/bin/python3.3
Also creating executable in venv01/bin/python
Installing distribute.........................................................................................................................................................................................................................................................................................................................................................................................................done.
Installing pip....
Complete output from command /home/user/venv01/bin/python3.3 -x /home/user/venv01/bin/easy_install /usr/local/lib/pytho...ort/pip-1.3.1.tar.gz:
/home/user/venv01/bin/python3.3: can't open file '/home/user/venv01/bin/easy_install': [Errno 2] No such file or directory
----------------------------------------
...Installing pip...done.
Traceback (most recent call last):
File "/usr/local/bin/virtualenv-3.3", line 9, in <module>
load_entry_point('virtualenv==1.9.1', 'console_scripts', 'virtualenv-3.3')()
File "/usr/local/lib/python3.3/site-packages/virtualenv.py", line 979, in main
no_pip=options.no_pip)
File "/usr/local/lib/python3.3/site-packages/virtualenv.py", line 1094, in create_environment
install_pip(py_executable, search_dirs=search_dirs, never_download=never_download)
File "/usr/local/lib/python3.3/site-packages/virtualenv.py", line 667, in install_pip
filter_stdout=_filter_setup)
File "/usr/local/lib/python3.3/site-packages/virtualenv.py", line 1057, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /home/user/venv01/bin/python3.3 -x /home/user/venv01/bin/easy_install /usr/local/lib/pytho...ort/pip-1.3.1.tar.gz failed with error code 2
Running it with -vvv yields some interesting output that shows that distribute
is extracted to <venv>/local/lib/python3.3/site-packages/.
I wonder why distribute is not installed into <venv>/lib/python3.3/site-packages/?
Does anyone have an idea why this happens and how I can use virtualenv in
openSuSE without compiling python3 myself?
[now fixed in latest patches from opensuse]
[oh! i just realised you are the same person as the original link. sorry. but i will leave this as it is a top result for google search on this issue (was searching myself for any update) so it may help others.]
this is a known issue, discussed at https://forums.opensuse.org/english/get-technical-help-here/applications/484475-using-virtualenv-python-3-a.html and with an open bug at https://bugzilla.novell.com/show_bug.cgi?id=809831
the only work-around i know of is to install everything yourself. it's not so hard, and i describe what is necessary at http://www.acooke.org/cute/GettingPyt0.html
basically:
install python 3.3 from source (do an "altinstall" to install as /usr/local/bin/python3.3)
fix the lib issue (link lib_dynload from /usr/local/lib64/python3.3 to /usr/local/lib/python3.3)
install distutils
install virtualenv
then you can use python3.3 and virtual-env-3.3 etc as expected.

Resources