Trying unsuccessfully to install pdfquery on my Win 7 machine, but running into "SyntaxError: invalid syntax"
Environment: Windows 7, Home Premium, Service Pack 1. Python 3.4.2.
I tried the steps suggested by BigBang at 30845808 , but still unable to install. Here is a screenshot of the error (running CMD shell as Admin)
All suggestions welcome as this module looks very useful (once installed ;-) )
Thanks. I'm embarasssed not to have noticed that. Got in touch w the author of pdfquery who said, "The package doesn't support Python3 right now, no -- see this bug: https://github.com/jcushman/pdfquery/issues/22
The Python2 print statement appears in the pdfminer library, which is a major dependency for pdfquery. So probably the biggest hurdle is getting pdfminer to support Python3 -- after that, updating pdfquery would be pretty easy."
Related
I was cleaning out my laptop and somehow screwed up my Python installation. Now I'm getting an error that I can't even find the answer to in Google (I usually copy and paste the error msg as a Google search and it usually leads me to an answer on here or other sites). This is the error msg verbatim: Fatal error in launcher: Unable to create process using '"C:\Python310\python.exe" "C:\Python310\Scripts\pip.exe" install Flask': The system cannot find the file specified.
I just reinstalled Python 3.10 via the installer from the Python site (so as not to screw up with Linux install since it likes to auto install 2.7 for some reason)
Any help would be greatly appreciated as always
I use a Mac and haven't used Sublime Text and Python in a few months, and have come back to it for a project. But, I get an error when I try to build documents I've definitely built before, and even the simplest test document (ex. print("Hello World!")). It must be because of some Mac update, but I am not on Big Sur, I'm still on Catalina. I can't update to Big Sur to fix my problem because of my work I need certain programs that are not compatible with Big Sur yet.
I get the following error:
/Users/maxzhou/.bash_profile: line 1: export: `v6.1.1/bin': not a valid identifier
bash: /Library/Frameworks/Python.framework/Versions/2.7/bin/python: Bad CPU type in executable
[Finished in 0.0s with exit code 126]
[shell_cmd: python -u "/Users/maxzhou/Documents/Test file.py"]
[dir: /Users/maxzhou/Documents]
[path: /Library/Frameworks/Python.framework/Versions/3.8/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/Applications/Racket:/Applications/Racket v6.1.1/bin]
I vaguely remember encountering this error when setting up Sublime Text for the first time, but now don't remember how to fix this.
Sorry, I met a similar error as well and my Macbook is also Catalina...
When I restart my Mac and try to run Python codes on Sublime Text 3 using "Python" system built by Sublime at the first time, everything is ok, but if I quit Sublime and then open it and run python codes then I will get some errors... e.g. if I "import bs4" then I will get an error "there is no module called bs4" but I do install this module by pip install (as well as pip3 because I install two kinds of Python in my Mac, one is Anaconda while another is Python 3.8)...
I don't know what happens but I think this might be kind of bug on Mac or Sublime maybe...
Description
When I tried to install package sacrebleu, I got an error like this:
Installation Error
It said "System cannot find the specified file". However I have no idea how to solve it.
I have tried installing package mecab-python3. But it confuses me that it was successfully installed in Anaconda but got an error, "Microsoft Visual C++ 14.0 is required", in original python38 environment.
Whether the package mecab-python3 has been installed or not, I still got the same error and cannot install sacrebleu.
I also tried restarting my machine but it does not work.
Is there anyone could solve it? or I want to know if there is any alternative package I can use to calculate BLEU score.
Thanks Anyway!
My Environment
Windows 10
Python 3.8
pip 20.1.1
Anaconda3 v4.8.2
I'm the mecab-python3 maintainer. Sorry it's giving you trouble.
The README has a link to the C++ runtime pack you have to install on Windows, if you install that it should work.
I have heard reports of the package not working with Anaconda on Windows specifically, though it seems to work sometimes. If you have trouble please open an issue and I'll try to fix it. On the other hand, if you aren't processing Japanese there's no reason to import the module and that may be a bug in sacrebleu.
Ah, actually, I just saw your screenshot - didn't notice it before.
Versions before 1.0 don't support Windows. But to keep using the old dictionary, sacrebleu has to make some changes, so they don't support 1.0+ yet. I think they are working on it, see this issue.
I'm getting:
"ImportError: No module named builtins"
that has only started happening after I installed a later version of PsychoPy (an application that uses Python that is used for writing psychology experiments). I was not getting this problem with an older version
I tried doing "sudo pip install future" like someone else recommended for fixing a similar problem. However, when I do this I get an "invalid syntax" error, and don't know of any other way around the problem. I would greatly appreciate any help on this.
Edit
Could it be you enter the command into a Python prompt? You are supposed to enter that command on the command line of your operating system shell. Which means not inside Python.
Original Answer
Like Deesha already mentioned in their comment, you must install the future package into the Python environment you wish to run PsychoPy in, e.g. via pip:
pip install future
or via conda:
conda install future
This is because newer versions of PsychoPy support both Python 2.7 and 3. The future package is used to ensure the code runs on both platforms.
Instead of using a Python distribution, I decided to install Scipy myself and stumbled upon Scipy Superpack (http://fonnesbeck.github.io/ScipySuperpack/). After installing Python 2.7.6 I followed the instructions on the website and everything seemed to work without any problems. However, once the installation was done I received a "fatal error" message as I tried to look through my modules. More specifically, the following error:
>>> help('modules')
Please wait a moment while I gather a list of all available modules...
Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6
I receive the same error message in the terminal, as well as through IDLE. Despite the error message, I am able to import and use numpy, as well as other modules from the superpack.
I should mention that prior to installing the superpack I installed pip. However, this didn't induce the previously mentioned error.
I am very new to osx, so any advice would be greatly appreciated!
I was also having a lot of problems while trying to install all the python libraries in my mac. I searched on the web for some hours and finally got something that worked out for me.
Scipy is here as well if you want to follow this rules instead:
https://gist.github.com/audy/4012573